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: multiselect was not saving values when it had no focus #401

Conversation

alessandrojcm
Copy link
Collaborator

When an edit modal had a multiselect input and the pill "X" button was clicked the value was not removed. This is because the saveInputValueToRowCache function was only called in the onBlur handler. Since the input never gains focus in this case, the handler never gets called and the input's value does not get saved in the row's cache.

This fix calls saveInputValueToRowCache inside the onChange handler only when the input doesn't have focus.

Closes #381

@alessandrojcm alessandrojcm added bug Something isn't working V2 Issue with MRT V2 labels Aug 27, 2024
@alessandrojcm alessandrojcm self-assigned this Aug 27, 2024
@alessandrojcm alessandrojcm linked an issue Aug 27, 2024 that may be closed by this pull request
1 task
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mantine-react-table ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 7:51pm
mantine-react-table-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 7:51pm

@KevinVandy KevinVandy merged commit 7406615 into v2 Sep 25, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working V2 Issue with MRT V2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot remove MultiSelect Chip without Dropdown being Active
2 participants