How can I change Angular Material code below, so that data-table is sorted by \'name\' column, ascending order by default. Arrow (indicating current sort direction) must be
You're mistaking matSortStart for matSortDirection.
matSortStart
matSortDirection
Try this:
https://plnkr.co/edit/sg0hC5d8LTjLKhbH9Eug?p=preview matSortStart can be used to reverse the cycle used when sort (e.g. when the user clicks to sort, it starts at desc instead of asc). 0 讨论(0) 查看其它9个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
https://plnkr.co/edit/sg0hC5d8LTjLKhbH9Eug?p=preview
matSortStart can be used to reverse the cycle used when sort (e.g. when the user clicks to sort, it starts at desc instead of asc).