Skip to content

Commit

Permalink
fix(filterablemultiselect): get itemToString from useCombobox instead…
Browse files Browse the repository at this point in the history
… of useMultipleSelection
  • Loading branch information
tay1orjones committed Oct 9, 2024
1 parent 15d99ef commit b5f2e4d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Downshift, {
useMultipleSelection,
type UseComboboxProps,
type UseMultipleSelectionProps,
type A11yRemovalMessage,
UseComboboxInterface,
UseComboboxStateChangeTypes,
UseMultipleSelectionInterface,
Expand Down Expand Up @@ -158,9 +159,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 @@ -633,7 +632,6 @@ const FilterableMultiSelect = React.forwardRef(function FilterableMultiSelect<
activeIndex: highlightedIndex,
initialSelectedItems,
selectedItems: controlledSelectedItems,
itemToString,
onStateChange(changes) {
switch (changes.type) {
case SelectedItemKeyDownBackspace:
Expand Down

0 comments on commit b5f2e4d

Please sign in to comment.