diff --git a/.changeset/shy-birds-jump.md b/.changeset/shy-birds-jump.md new file mode 100644 index 0000000000..d3f87e0ecb --- /dev/null +++ b/.changeset/shy-birds-jump.md @@ -0,0 +1,5 @@ +--- +"@twilio-paste/combobox": patch +--- + +Changed type of MultiselectComboboxProps.onSelectedItemsChange.newSelectedItems to include type that is returned when not in IoC mode diff --git a/packages/paste-core/components/combobox/src/types.ts b/packages/paste-core/components/combobox/src/types.ts index feba49dd0f..5f54226b60 100644 --- a/packages/paste-core/components/combobox/src/types.ts +++ b/packages/paste-core/components/combobox/src/types.ts @@ -247,9 +247,12 @@ export interface MultiselectComboboxProps /** * Callback function for after an item is selected or deselected * + * If `state` prop is passed, `UseMultiSelectPrimitiveStateChange` is the type for the `newSelectedItems` callback param + * + * If `state` prop isn't passed, `any[]` is the type for the `newSelectedItems` callback param * @memberof MultiselectComboboxProps */ - onSelectedItemsChange?: (newSelectedItems: UseMultiSelectPrimitiveStateChange) => void; + onSelectedItemsChange?: (newSelectedItems: any[] | UseMultiSelectPrimitiveStateChange) => void; /** * Hidden helper text for screen readers *