Is there any way to get the sorted data from a material table after sorts on the table have been applied? I can see "filteredData" in the table datasource but there's no "sortedData". The reason why I want the sorted data is so that I can export it in a csv file while maintaining all of the sorts applied. I've been using the built in MatSort to sort individual columns in the table.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is a sort data method, that you can use with either datasource.data or datasource.filteredData
dataSource.sortData(dataSource.filteredData,dataSource.sort);