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] Remove sortDirection from column definitions #1015

Merged
merged 3 commits into from
Feb 9, 2021

Conversation

dtassone
Copy link
Member

@dtassone dtassone commented Feb 8, 2021

  • [DataGrid] Remove sortDirection from column definitions. Consolidate around fewer ways of doing the same thing.

    -columns[1] = { ...columns[1], sortDirection: 'asc' };
    
    return (
      <div className="grid-container">
    -   <DataGrid rows={rows} columns={columns} />
    +   <DataGrid rows={rows} columns={columns} sortModel={[{field: columns[1].field, sort: 'asc'}]} />
      </div>

fix #244

@dtassone dtassone requested review from oliviertassinari and DanailH and removed request for oliviertassinari February 8, 2021 18:20
@oliviertassinari oliviertassinari added breaking change component: data grid This is the name of the generic UI component, not the React module! labels Feb 8, 2021
@oliviertassinari oliviertassinari changed the title [DataGrid] Remove sort col def [DataGrid] Remove sortDirection from column definitions Feb 8, 2021
@dtassone dtassone merged commit 7a01563 into mui:master Feb 9, 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.

[RFC] Configure sorting a single place for simplicity
2 participants