You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the documentation says, createNewItemFromQuery "invoked when user interaction causes one or many items to be created, either by pressing the Enter key or by clicking on the "Create Item" option". But in fact, the function is called once the MultiSelect2 component is initialized. Related code here:
"createNewItemFromQuery is called!" is printed without any interactions.
Actual behavior
createNewItemFromQuery is called without user interactions.
Expected behavior
createNewItemFromQuery should be only invoked when user interaction causes one or many items to be created, either by pressing the Enter key or by clicking on the "Create Item" option.
Possible solution
Make the initial value of state.createNewItem to undefined?
The text was updated successfully, but these errors were encountered:
As the documentation says,
createNewItemFromQuery
"invoked when user interaction causes one or many items to be created, either by pressing the Enter key or by clicking on the "Create Item" option". But in fact, the function is called once the MultiSelect2 component is initialized. Related code here:blueprint/packages/select/src/components/query-list/queryList.tsx
Line 211 in abd066f
Environment
Code Sandbox
Link to a minimal repro: https://codesandbox.io/s/nifty-hawking-oucqgc
Steps to reproduce
Actual behavior
createNewItemFromQuery is called without user interactions.
Expected behavior
createNewItemFromQuery should be only invoked when user interaction causes one or many items to be created, either by pressing the Enter key or by clicking on the "Create Item" option.
Possible solution
Make the initial value of
state.createNewItem
toundefined
?The text was updated successfully, but these errors were encountered: