From b5f2e4d6800c1fe5671e2fd18a3588cf9611adf8 Mon Sep 17 00:00:00 2001 From: Taylor Jones Date: Wed, 9 Oct 2024 14:58:27 -0500 Subject: [PATCH] fix(filterablemultiselect): get itemToString from useCombobox instead of useMultipleSelection --- .../src/components/MultiSelect/FilterableMultiSelect.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react/src/components/MultiSelect/FilterableMultiSelect.tsx b/packages/react/src/components/MultiSelect/FilterableMultiSelect.tsx index 368ba6278f61..d363c09021ad 100644 --- a/packages/react/src/components/MultiSelect/FilterableMultiSelect.tsx +++ b/packages/react/src/components/MultiSelect/FilterableMultiSelect.tsx @@ -12,6 +12,7 @@ import Downshift, { useMultipleSelection, type UseComboboxProps, type UseMultipleSelectionProps, + type A11yRemovalMessage, UseComboboxInterface, UseComboboxStateChangeTypes, UseMultipleSelectionInterface, @@ -158,9 +159,7 @@ export interface FilterableMultiSelectProps items: readonly ItemType[], extra: { inputValue: string | null; - itemToString: NonNullable< - UseMultipleSelectionProps['itemToString'] - >; + itemToString: NonNullable['itemToString']>; } ): ItemType[]; @@ -633,7 +632,6 @@ const FilterableMultiSelect = React.forwardRef(function FilterableMultiSelect< activeIndex: highlightedIndex, initialSelectedItems, selectedItems: controlledSelectedItems, - itemToString, onStateChange(changes) { switch (changes.type) { case SelectedItemKeyDownBackspace: