-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data-grid] Fix crashing of demos on rating change #12315
Conversation
Deploy preview: https://deploy-preview-12315--material-ui-x.netlify.app/ |
if (value !== 0) { | ||
element.querySelector<HTMLElement>(`input[value="${value}"]`)!.focus(); | ||
} else { | ||
element.querySelector<HTMLElement>(`input[value=""]`)!.focus(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when ever user goes one up on 5
and down on 1
, value
will be 0
.
As there are no inputs with value="0"
demos were crashing on focusing non existing inputs. So focusing on input with no value (input[value=''])
whenever value=0
seems to fix the issue.
fixes 2nd bug mentioned in this comment #12199 (comment)
PR for 1st point --> #12335
preview: https://deploy-preview-12315--material-ui-x.netlify.app/x/react-data-grid/filtering/quick-filter/