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] Improve controllable sorting #2095

Merged
merged 6 commits into from
Jul 20, 2021
Merged

Conversation

dtassone
Copy link
Member

@dtassone dtassone commented Jul 7, 2021

Part of #2044 (sorting)

// Props
- onSortModelChange?: (params: GridSortModelParams) => void;
+ onSortModelChange?: (model: GridSortModel) => void;

// Usage
- <DataGrid onSortModelChange = {(params: GridSortModelParams)=>  setSortModel(params.model)} />
+ <DataGrid onSortModelChange = {(model: GridSortModel)=> setSortModel(model) } />

Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

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

Most of the demos in https://deploy-preview-2095--material-ui-x.netlify.app/components/data-grid/sorting/ are broke or the sorting is locked.

@dtassone dtassone requested a review from m4theushw July 15, 2021 13:24
Copy link
Member

@m4theushw m4theushw left a comment

Choose a reason for hiding this comment

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

Almost there.

@oliviertassinari oliviertassinari added the component: data grid This is the name of the generic UI component, not the React module! label Jul 17, 2021
@oliviertassinari oliviertassinari changed the title [DataGrid] implement control state for sorting [DataGrid] Improve controllable sorting Jul 17, 2021
@dtassone dtassone merged commit 90c3acd into mui:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change 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.

4 participants