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
We are using Carbon inputs in a filter form where we need to include a "reset filters" button, which sets the state of the form to the initial state. Every input gets initialiazed as expected except for MultiSelect.Filterable, which retains the selection (even though the state changes properly and the list is correctly unfiltered).
Since the MultiSelect does not have a traditional "value" prop, is there a way to programatically change or restart the selected items?
Relevant information
react: 16.13.1
carbon-components: 10.14.0
carbon-components-react: 7.14.0
Please do not hesitate to ask for any extra information you mey need.
Thank you very much in advance!
The text was updated successfully, but these errors were encountered:
I don't believe this use case is well supported beyond setting the initial selected items and rerendering the component with modifiede initial selected items using a key
I'm using Carbon MultiSelect in a filter form with a "reset filters" button. initialSelectedItems is not getting cleared when set to empty array [].
Could you please provide a working example on how to clear MultiSelect selected items programmatically?
What package(s) are you using?
carbon-components
carbon-components-react
Summary
We are using Carbon inputs in a filter form where we need to include a "reset filters" button, which sets the state of the form to the initial state. Every input gets initialiazed as expected except for MultiSelect.Filterable, which retains the selection (even though the state changes properly and the list is correctly unfiltered).
Since the MultiSelect does not have a traditional "value" prop, is there a way to programatically change or restart the selected items?
Relevant information
react
: 16.13.1carbon-components
: 10.14.0carbon-components-react
: 7.14.0Please do not hesitate to ask for any extra information you mey need.
Thank you very much in advance!
The text was updated successfully, but these errors were encountered: