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 filter input value #10691

Closed
wants to merge 1 commit into from
Closed

Fix filter input value #10691

wants to merge 1 commit into from

Conversation

gitstart
Copy link
Contributor

@gitstart gitstart commented Oct 16, 2023

Description

[data grid] onFilterModelChange fires with stale field value

Suggestion to fix Issue

Upon investigation, we discovered that this issue occurs when a user wants to filter a value in a String column and then tries to change the String Column to a Number column. When this happens, the program tries to parse the string value the user initially inputted in the Value Textfield to a number value, because it's unable to do that, it clears out the value from the Text Field but the value still remains in the items object in the program.

The simple solution to this would be to reset the item value property when the user switches from one column to another.


This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.

Co-authored-by: jasmyneokudo <38866525+jasmyneokudo@users.noreply.github.com>
@mui-bot
Copy link

mui-bot commented Oct 16, 2023

Deploy preview: https://deploy-preview-10691--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against a95365d

@gitstart gitstart closed this Oct 18, 2023
@zannager zannager added the component: data grid This is the name of the generic UI component, not the React module! label Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] onFilterModelChange fires with stale field value
3 participants