Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[select] fix(MultiSelect2): restore tagInputProps.onChange support #5733

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/select/src/components/multi-select/multiSelect2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,20 @@ export interface MultiSelect2Props<T> extends ListItemsProps<T>, SelectPopoverPr
* Props to pass to the [TagInput component](##core/components/tag-input).
*
* Some properties are unavailable:
* - `tagInputProps.value`: use `query` instead
* - `tagInputProps.onChange`: use `onQueryChange` instead
* - `tagInputProps.inputValue`: use `query` instead
* - `tagInputProps.onInputChange`: use `onQueryChange` instead
*
* Some properties are available, but discouraged. If you find yourself using these due to a bug in MultiSelect2
* or some edge case which is not handled by `onItemSelect`, `onItemsPaste`, `onRemove`, and `onClear`, please
* file a bug in the Blueprint repo:
* - `tagInputProps.onChange`
*
* Notes for `tagInputProps.rightElement`:
* - you are responsible for disabling any elements you may render here when the overall `MultiSelect2` is disabled
* - if the `onClear` prop is defined, this element will override/replace the default rightElement,
* which is a "clear" button that removes all items from the current selection.
*/
tagInputProps?: Partial<Omit<TagInputProps, "value" | "onChange">>;
tagInputProps?: Partial<Omit<TagInputProps, "inputValue" | "onInputChange">>;

/** Custom renderer to transform an item into tag content. */
tagRenderer: (item: T) => React.ReactNode;
Expand Down