bug(table): Programmatic triggering of sort with cdkDropList does not work
Reproduction
Stackblitz: https://stackblitz.com/edit/angular-material-dllyke?file=app/app.component.html Steps to reproduce:
- Sort the Table by column "Name"
- Drag and Drop one row
Expected Behavior
The Sort triggered by the method onListDrop does sort the table correctly and the sort indicator of the table-header is not shown at the weight (drag handle) column.
Actual Behavior
Sorting does not work with calling MatSort#sort. With two calls, however, it does. The sorting indicator is removed from the "Name" column, but it is not added to the "Weight" column.
The sort order does not seem to work either. The default sort order is "asc". However, if you set "asc" when calling MatSort#sort , the sort order changes.
Environment
- Angular:
- CDK/Material: 8.2.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu):
It's not clear to me why the arrow is not correctly appearing by the column. Will need further investigation
We are closing this issue, because we've determined, using a semi-automated process, that it is no longer relevant, has low engagement, or it does not have enough information to proceed. Feel free to comment if you think the issue should be reopened, or open a new issue with the latest version of our code instead.
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.