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
MultiSelect.Filterable component doesnt have selectedItems property like its relative Dropdown component.
It only has the "initalSelectedItems" which allows to set the initial internal state.
This causes a big limitation and buggy behaviour where we cannot programmatically reset the internal values of the component.
What did you expect to happen?
allow programmatically setting internal selected values. same behaviour exists in Dropdown component
What happened instead?
with onChange i can retreive values selected but i cannot clear or set values without interraction with component after inital rendering
What would you like to see changed?
a way to programatically set values as it should be possible with all components
What browser are you working in?
Google Chrome
What offering/product do you work on?
Ibm cloud Power-iaas. This issue causes major blocker where we set values outside the component which are not reflected. also i cannot clear values in the component without the interraction with component check boxes or chip close button
Steps to reproduce the issue
create component with a list and provide the selected items in 'initialSelectedItems' or 'selectedItems' as it has been done in combobox and dropdown components
store initialSelected items in a react state
change that state by this.setState or with useState setter
For initialSelectedItems, the hope with the prop name is that it reveals that what is passed to the component only represents what is selected on the initial render - it's not meant for after-creation updates. Renders after that will "desync" from what is provided in that initial value. Rendering the component with a new key should resolve this issue and force the component to recreate a new instance of the component.
I hope that this is closed only because its a duplicate and not because of the "rendering with new key" workaround.
is this #4812 request going to be implemented? and when is the ETA? its open since 2019
I can confirm that since the issue was raised in 2019 nothing has been done to address the problem. This is causing a lot of difficulty for me and my team.
What package(s) are you using?
Detailed description
Steps to reproduce the issue
Reduced test case in CodeSandbox
The text was updated successfully, but these errors were encountered: