[data grid] onSortModelChange
now gets passed sorts with a direction of null
.
#12271
Labels
component: data grid
This is the name of the generic UI component, not the React module!
feature: Sorting
Related to the data grid Sorting feature
regression
A bug, but worse
support: commercial
Support request from paid users
support: premium standard
Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Steps to reproduce
No response
Current behavior
In v6 of the datagrid when a sort is removed, the sort model passed to the
onSortModelChange
would also have the entire sort entry removed for that field.In v7 (beta 4) of the datagrid when a sort is removed, the sort model contains an entry for that field with a sort direction of
null
. This means the sortmodel will just continue to grow. Is this intended as it appears to be a breaking change?Expected behavior
The sort model should have the entry removed when a sort is removed.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: onSortModelChange
Order ID: 45466
The text was updated successfully, but these errors were encountered: