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

[DataGrid] Fix number filter field formatting values while typing #16062

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

arminmeh
Copy link
Contributor

@arminmeh arminmeh commented Jan 2, 2025

Closes #16052

Regression of #15829

@arminmeh arminmeh added component: data grid This is the name of the generic UI component, not the React module! regression A bug, but worse feature: Filtering Related to the data grid Filtering feature needs cherry-pick The PR should be cherry-picked to master after merge v7.x feature: Filtering on header Related to the header filtering (Pro) feature labels Jan 2, 2025
@arminmeh arminmeh requested a review from a team January 2, 2025 19:41
@@ -366,7 +366,11 @@ const GridHeaderFilterCell = forwardRef<HTMLDivElement, GridHeaderFilterCellProp
disabled={isFilterReadOnly || isNoInputOperator}
tabIndex={-1}
InputLabelProps={null}
sx={colDef.type === 'date' || colDef.type === 'dateTime' ? dateSx : undefined}
sx={
colDef.type === 'date' || colDef.type === 'dateTime' || colDef.type === 'number'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is to cover cases when the field is focused out but the value is invalid (like 1e)
adds the same UX as leaving the date filter incomplete

@mui-bot
Copy link

mui-bot commented Jan 2, 2025

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

Generated by 🚫 dangerJS against 3766dc0

@arminmeh arminmeh enabled auto-merge (squash) January 3, 2025 12:06
@arminmeh arminmeh merged commit 5f0cd45 into mui:master Jan 3, 2025
16 checks passed
Copy link

github-actions bot commented Jan 3, 2025

Cherry-pick PRs will be created targeting branches: v7.x

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! feature: Filtering on header Related to the header filtering (Pro) feature feature: Filtering Related to the data grid Filtering feature needs cherry-pick The PR should be cherry-picked to master after merge regression A bug, but worse v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Impossible to type decimal numbers starting with .0 in the filter
3 participants