Skip to content

Added multi column sort #619

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

Merged

Conversation

Diiegoav
Copy link
Contributor

@Diiegoav Diiegoav commented Sep 21, 2022

Related Issue

#585 Multiple Sorting

Description

  • Removed single sorting, to apply multi column sorting, based on maxColumnSortProp.
  • Added new initialOrderCollection to specify an initial multi column sort.
  • Added new showColumnSortOrder & sortOrderIndicatorStyle, for show the order indicator of clicked column, and be able to styled it need it.
  • Allow the user to still use columns.options.customSort.
  • Kept the current columns.option.sorting flag to turn on/off any column from sorting.
  • Deprecated options.sorting, query.orderBy, query.orderDirection and onOrderChange.

Works on normal, tree and group table, for group table groups child data only supports single sort.

Related PRs

List related PRs against other branches:

  • none

Impacted Areas in Application

List general components of the application that this PR will affect:

* src/material-table.js
* src/utils/data-manager.js
* src/components/MTableHeader/index.js

Additional Notes

Please review the pr, let me know your thoughts, and if there is any feedback let me know to update the pr, I think this multicolumn sort could be a great contribution for all the community that uses material table :)

@Domino987 Domino987 merged commit 1a462c8 into material-table-core:master Sep 23, 2022
@Diiegoav Diiegoav deleted the feature/multi-column-sort branch September 23, 2022 13:47
Domino987 pushed a commit that referenced this pull request Nov 20, 2022
```
'Property `sorting` has been deprecated, please start using `maxColumnSort` instead. #619'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants