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

feat(components/sort): add multi-sort support #28458

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imerljak
Copy link

Adds multi-column sorting capability to MatSort, allowing to sort a table on multiple of its columns at once by toggling matSortMultiple.

This feature adds a new sortState variable inside MatSort that should be used as a source of truth when matSortMultiple is enabled.
Fixes #24102

Copy link

google-cla bot commented Jan 21, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ricovivid
Copy link

@imerljak when in multi-sort will this also persist the visibility of the sort arrows when multiple columns are sorted?

@imerljak
Copy link
Author

@imerljak when in multi-sort will this also persist the visibility of the sort arrows when multiple columns are sorted?

You mean the visual feedback at the table header? Yep. If two cols are sorted they will render the header accordingly.

@dsab123
Copy link

dsab123 commented Mar 25, 2024

Just poking in to say that this is a great idea 👌 Thank you @imerljak and angular team!

Adds multi-column sorting capability to MatSort, allowing to sort a table on multiple of its
columns at once by toggling matSortMultiple.

This feature adds a new sortState variable inside MatSort that should be used as a source of truth
when matSortMultiple is enabled.
Fixes angular#24102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detected: feature PR contains a feature commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(MatSort): Enable multi-sorting capability on current Interface
3 participants