Skip to content

Commit

Permalink
fix(deps): update dependency downshift to v9 (#17231)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency downshift to v9

* fix(filterablemultiselect): get itemToString from useCombobox instead of useMultipleSelection

* chore: remove unused type

* chore: run yarn format

* fix: changed web components carbonstyles version to match react

* fix: added ? for item

* fix: dedupe and format

* fix: format and ?

* feat: format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Taylor Jones <taylor.jones826@gmail.com>
Co-authored-by: Gururaj J <89023023+Gururajj77@users.noreply.github.com>
Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: Gururajj77 <gururajtakeshi@gmail.com>
  • Loading branch information
6 people authored Nov 12, 2024
1 parent e37b83b commit 78a52c8
Show file tree
Hide file tree
Showing 107 changed files with 439 additions and 514 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@ibm/telemetry-js": "^1.5.0",
"classnames": "2.5.1",
"copy-to-clipboard": "^3.3.1",
"downshift": "8.5.0",
"downshift": "9.0.8",
"flatpickr": "4.6.13",
"invariant": "^2.2.3",
"lodash.debounce": "^4.0.8",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/ComboBox/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ const ComboBox = forwardRef(
inputId: id,
stateReducer,
isItemDisabled(item, _index) {
return (item as any).disabled;
return (item as any)?.disabled;
},
...downshiftProps,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ export interface FilterableMultiSelectProps<ItemType>
items: readonly ItemType[],
extra: {
inputValue: string | null;
itemToString: NonNullable<
UseMultipleSelectionProps<ItemType>['itemToString']
>;
itemToString: NonNullable<UseComboboxProps<ItemType>['itemToString']>;
}
): ItemType[];

Expand Down Expand Up @@ -544,7 +542,7 @@ const FilterableMultiSelect = React.forwardRef(function FilterableMultiSelect<
inputValue,
stateReducer,
isItemDisabled(item, _index) {
return (item as any).disabled;
return (item as any)?.disabled;
},
});
function stateReducer(state, actionAndChanges) {
Expand Down Expand Up @@ -641,7 +639,6 @@ const FilterableMultiSelect = React.forwardRef(function FilterableMultiSelect<
activeIndex: highlightedIndex,
initialSelectedItems,
selectedItems: controlledSelectedItems,
itemToString,
onStateChange(changes) {
switch (changes.type) {
case SelectedItemKeyDownBackspace:
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/MultiSelect/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ const MultiSelect = React.forwardRef(
selectedItem: controlledSelectedItems,
items: filteredItems as ItemType[],
isItemDisabled(item, _index) {
return (item as any).disabled;
return (item as any)?.disabled;
},
...downshiftProps,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"wca": "web-component-analyzer analyze src --outFile custom-elements.json"
},
"dependencies": {
"@carbon/styles": "1.63.1",
"@carbon/styles": "^1.68.0",
"@floating-ui/dom": "^1.6.3",
"@ibm/telemetry-js": "^1.5.0",
"flatpickr": "4.6.13",
Expand Down
Loading

0 comments on commit 78a52c8

Please sign in to comment.