components
components copied to clipboard
fix(material/table): data not being re-rendered when sortingDataAccessor is changed
Fixes the table's data not re-rendering when a new sortingDataAccessor is assigned to the data source.
Fixes #15888.
@crisbeto It looks like this PR is outdated, please rebase the PR.
I spent some time trying to get this to pass all the internal checks, but it appears to be more breaking than I was expecting. The problem is that changing the sortDataAccessor to a getter/setter causes compilation errors for apps that do something like this:
class MyDataSource extends MatTableDataSource {
override sortDataAccessor = customSortDataAccessor;
}
I tried working around it with the defineProperty call, but it ended up causing other issues. We should discuss whether it's worth the effort to continue with this change.