Skip to content

docs(material/table): describe how to properly update MatTableDataSource #27708 #29406

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
merged 2 commits into from
Jul 11, 2024

Conversation

HermanWKeuris
Copy link
Contributor

Added a description of how to update MatTableDataSource without breaking sorting

Fixes #27708

Added a description of how to update MatTableDataSource without breaking sorting

Fixes angular#27708
@HermanWKeuris HermanWKeuris requested a review from a team as a code owner July 10, 2024 06:56
@HermanWKeuris HermanWKeuris requested review from crisbeto and andrewseguin and removed request for a team July 10, 2024 06:56
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jul 10, 2024
@@ -200,6 +200,8 @@ Note that if the data properties do not match the column names, or if a more com
accessor is required, then a custom `sortingDataAccessor` function can be set to override the
default data accessor on the `MatTableDataSource`.

When updating the data soure asynchronously avoid doing so by reinstanciate the entire `MatTableDataSource` as this could break sorting. Rather update it through the `MatTableDataSource.data` property.
Copy link
Member

Choose a reason for hiding this comment

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

reinstanciate -> recreating

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with the requested copy changes

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Jul 11, 2024
@crisbeto crisbeto removed the request for review from andrewseguin July 11, 2024 11:09
@crisbeto crisbeto merged commit ae83977 into angular:main Jul 11, 2024
10 of 12 checks passed
crisbeto pushed a commit that referenced this pull request Jul 11, 2024
…rce #27708 (#29406)

* docs(material/table): describe how to properly update MatTableDataSource

Added a description of how to update MatTableDataSource without breaking sorting

Fixes #27708

* Updated copy from reinstanciate to recreating

(cherry picked from commit ae83977)
DBowen33 pushed a commit to DBowen33/components that referenced this pull request Jul 12, 2024
…rce angular#27708 (angular#29406)

* docs(material/table): describe how to properly update MatTableDataSource

Added a description of how to update MatTableDataSource without breaking sorting

Fixes angular#27708

* Updated copy from reinstanciate to recreating
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs-bug(COMPONENT): Implementation of asynchronous data sorting should be documented
2 participants