Skip to content

[DataGrid] fix quick filter dropping a pending search on parser identity change - #23575

Open
michelengelen wants to merge 1 commit into
mui:masterfrom
michelengelen:bugfix/23572-quickfilter-parser-debounce
Open

michelengelen wants to merge 1 commit into
mui:masterfrom
michelengelen:bugfix/23572-quickfilter-parser-debounce

Conversation

@michelengelen

Copy link
Copy Markdown
Member

the commit logic moved into an identity-stable commitQuickFilterValue via useEventCallback (the repo's established pattern), which reads parser at commit time. The debounced function is now memoized on [commitQuickFilterValue, debounceMs], so a re-render with a new inline parser no longer recreates it — and the effect cleanup no longer clears a pending commit. A genuine debounceMs change still recreates it deliberately, since debounce captures its delay at creation. A short comment linking #23572 guards the invariant.

Fixes #23572

@michelengelen michelengelen self-assigned this Sep 11, 2026
@michelengelen michelengelen added type: bug It doesn't behave as expected. scope: data grid Changes related to the data grid. feature: Filtering Related to the data grid Filtering feature labels Sep 11, 2026
@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-23575--material-ui-x.netlify.app/
QR code for https://deploy-preview-23575--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 🔺+5B(0.00%) 🔺+4B(0.00%)
@mui/x-data-grid-pro 🔺+5B(0.00%) 🔺+7B(0.00%)
@mui/x-data-grid-premium 🔺+6B(0.00%) 🔺+3B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 0B(0.00%) 0B(0.00%)
@mui/x-scheduler-premium 0B(0.00%) 0B(0.00%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: Filtering Related to the data grid Filtering feature scope: data grid Changes related to the data grid. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[data grid] QuickFilter silently drops the pending search when a re-render recreates an inline parser

1 participant