Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Open
imerljak wants to merge 2 commits into angular:main
base: main
Choose a base branch
Loading
from imerljak:multisort

Conversation

@imerljak
Copy link

@imerljak imerljak commented Jan 21, 2024

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

pmpak, ricovivid, Norskel, poveu, jappiejs, michaelcabanacirclek, mhelm306, inesalvestv, joecarl, joaomartinstv, and 4 more reacted with thumbs up emoji
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.

Copy link

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

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.

ricovivid reacted with thumbs up emoji

Copy link

dsab123 commented Mar 25, 2024

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

imerljak and ricovivid reacted with heart emoji

Copy link

amyngb commented Jul 10, 2024

Any updates on this PR?

Copy link

labeled commented Oct 18, 2024

Any updates? It looks like the branch now has conflicts. This would be a great simple add feature.

Copy link
Author

I am happy to check this during the weekend and fix the conflicts. But I am not sure if it will ever get merged at this pace.

Adds multi-column sorting capability to MatSort, allowing to sort a table based on multiple 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. It also adds a two helper methods to check sort state: isActive, which returns if the provided column ID is currently sorted, and getCurrentSortDirection that returns the SortDirection of the provided column ID.
Fixes angular#24102 
@imerljak imerljak requested a review from a team as a code owner October 19, 2024 00:02
@imerljak imerljak requested review from crisbeto and removed request for a team October 19, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@andrewseguin andrewseguin Awaiting requested review from andrewseguin

@crisbeto crisbeto Awaiting requested review from crisbeto crisbeto is a code owner automatically assigned from angular/components-googlers

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

detected: feature PR contains a feature commit

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

AltStyle によって変換されたページ (->オリジナル) /