MultiSelect-Dropdown: number of selected checkbox needs to reset from change in other component
See original GitHub issueDetailed description
Suppose In Multi-Select dropdown with checkbox, I have selected 2 items.
And now I want to reset the status flag of 2 selected items on change in the location component like below(This is the end goal):
But right now, I’m getting like this (Currently this is happening):
This issue is related to Multi-select Component.
What did you expect to happen? What happened instead? What would you like to see changed? I believe there should be some props/flag that I can send to multi-select component, based on that component can decide reset or not. Right now I think, on the selection of checkbox, we are pushing the selected object to selectedItems array. I have tried to reset this property on the change of location component, but there is no luck.
What version of the Carbon Design System are you using?
"carbon-components-react": "^5.19.1"
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top GitHub Comments
I already upvoted this, but meanwhile if that an help others, the only ugly way I found to rest the MultiSelect is to programmaticly click the reset button:
document.querySelectorAll('.bx--multi-select .bx--list-box__selection--multi').forEach(e => e.click())
add a first class properly to your component to make sure you just reset the one you want to.As there’s been no activity since this issue was marked as stale, we are auto-closing it.