Skip to content

Commit

Permalink
Upgrade react-aria packages
Browse files Browse the repository at this point in the history
Fix some types due to small type changes
Fix some tests due to small select changes
Patch @react-aria/overlays due to positioning bug

Change-Id: I755273c808f87d9ab41bf2d6ba1c6e4b7fbfbd83
GitOrigin-RevId: be8b7ca0597fc05d1ef17b91554f8bb213bb0a5d
  • Loading branch information
jaslong authored and Copybara committed May 7, 2024
1 parent 5a8caa9 commit 07a4b04
Show file tree
Hide file tree
Showing 30 changed files with 2,151 additions and 3,441 deletions.
42 changes: 21 additions & 21 deletions packages/react-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,24 @@
"@plasmicapp/nextjs-app-router": "1.0.11",
"@plasmicapp/prepass": "1.0.17",
"@plasmicapp/query": "0.1.79",
"@react-aria/checkbox": "^3.11.2",
"@react-aria/focus": "^3.14.3",
"@react-aria/interactions": "^3.19.1",
"@react-aria/listbox": "^3.11.1",
"@react-aria/menu": "^3.11.1",
"@react-aria/overlays": "^3.18.1",
"@react-aria/select": "^3.13.1",
"@react-aria/separator": "^3.3.7",
"@react-aria/ssr": "^3.8.0",
"@react-aria/switch": "^3.5.6",
"@react-aria/visually-hidden": "^3.8.6",
"@react-stately/collections": "^3.10.2",
"@react-stately/list": "^3.10.0",
"@react-stately/menu": "^3.5.6",
"@react-stately/overlays": "^3.6.3",
"@react-stately/select": "^3.5.5",
"@react-stately/toggle": "^3.6.3",
"@react-stately/tree": "^3.7.3",
"@react-aria/checkbox": "^3.14.2",
"@react-aria/focus": "^3.17.0",
"@react-aria/interactions": "^3.21.2",
"@react-aria/listbox": "^3.12.0",
"@react-aria/menu": "^3.14.0",
"@react-aria/overlays": "^3.22.0",
"@react-aria/select": "^3.14.4",
"@react-aria/separator": "^3.3.12",
"@react-aria/ssr": "^3.9.3",
"@react-aria/switch": "^3.6.3",
"@react-aria/visually-hidden": "^3.8.11",
"@react-stately/collections": "^3.10.6",
"@react-stately/list": "^3.10.4",
"@react-stately/menu": "^3.7.0",
"@react-stately/overlays": "^3.6.6",
"@react-stately/select": "^3.6.3",
"@react-stately/toggle": "^3.7.3",
"@react-stately/tree": "^3.8.0",
"classnames": "^2.5.1",
"clone": "^2.1.2",
"dlv": "^1.1.3",
Expand All @@ -133,9 +133,9 @@
"@babel/preset-env": "^7.22.15",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.22.15",
"@react-types/overlays": "^3.8.3",
"@react-types/select": "^3.8.4",
"@react-types/shared": "^3.21.0",
"@react-types/overlays": "^3.8.5",
"@react-types/select": "^3.9.2",
"@react-types/shared": "^3.22.1",
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
Expand Down
9 changes: 5 additions & 4 deletions plasmicpkgs/react-aria/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@
"clean": "rm -rf dist/ skinny/*.ts skinny/*.map skinny/*.js",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"test-storybook": "test-storybook"
"test-storybook": "test-storybook",
"upgrade-aria": "yarn upgrade --latest --scope @react-stately && yarn upgrade --latest --scope @react-aria && yarn upgrade --latest --scope react-aria-components"
},
"dependencies": {
"@react-aria/i18n": "^3.8.4",
"@react-aria/utils": "^3.21.1",
"react-aria-components": "^1.0.0-rc.0"
"@react-aria/i18n": "^3.11.0",
"@react-aria/utils": "^3.24.0",
"react-aria-components": "^1.2.0"
},
"devDependencies": {
"@plasmicapp/host": "1.0.194",
Expand Down
6 changes: 5 additions & 1 deletion plasmicpkgs/react-aria/src/registerComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ export function BaseComboBox<T extends object>(props: BaseComboBoxProps<T>) {
.map((op) => op.value);

const onSelectionChange = React.useCallback(
(key: Key) => {
(key: Key | null) => {
if (key === null) {
return;
}

const selectedOption = flattenedOptions?.find((op) => op.value === key);
if (valueType === "text") {
if (selectedOption) {
Expand Down
Loading

0 comments on commit 07a4b04

Please sign in to comment.