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

fix(multi-select): reset selectedIds when clearing selection #1832

Conversation

keehun
Copy link
Contributor

@keehun keehun commented Oct 22, 2023

Here I have a fix for issue #1831. I am unable to reproduce the issue (reproducible with master branch here) after applying this patch.

If there is a better way to handle initial state set from onMount(), I would love to implement a better solution. Please let me know.

@keehun keehun changed the title #1831: Reset selectedIds upon clearing of ListBoxSelection #1831: Reset selectedIds in MultiSelect upon clearing of ListBoxSelection Oct 22, 2023
@metonym metonym changed the title #1831: Reset selectedIds in MultiSelect upon clearing of ListBoxSelection fix(multi-select): reset selectedIds when clearing selection Oct 22, 2023
Copy link
Collaborator

@metonym metonym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for providing a clear repro and description. LGTM

@metonym metonym merged commit e3ab471 into carbon-design-system:master Oct 22, 2023
@metonym
Copy link
Collaborator

metonym commented Oct 23, 2023

Released in v0.81.1

@keehun
Copy link
Contributor Author

keehun commented Oct 23, 2023

I noticed another issue around setting initial state in onMount() where the checked items don't show at the top of the list when MultiSelect is focused for the first time. I'll create a repro and open another ticket (and hopefully a fix) when I have a bit of time, but wanted to leave that here before I forgot about it. (This is mostly a note for myself.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants