Non-server data-tables component not respecting 'default-sort' table option
ajm5774 opened this issue · comments
ajm5774 commented
Online reproduce
https://jsfiddle.net/eyn2x0rf/
Expected Behavior
Non-server table defaultSort should apply sort when table is created
Current Behavior
Non-server table defaultSort doesn't seem to do anything
Steps to Reproduce
- Create non-server table with table id and name columns. Set default sort to name descending
- Populated table with data with id and name where the name is not already sorted in descending order.
- When the table is rendered, the name column will show as sorting in descending order, but it will not actually be sorted.
Detailed Description
Non-server table default-sort should apply sort when table is created.
When the table is created, we just need to call "handleSort" in DataTables.vue if a tableProps.defaultSort is provided.