I need to create a button out of the table and upon click of the button I need to reset all the sort applied in any column of the v-datatable.
I am using the header config array to set sortable for one of the column in the datatable.
headers = [
{
text: 'Name'
sortable: true,
value: 'name',
},
text: 'Age'
sortable: false,
value: 'number',
},
];
Tried searching for the api to reset the sort applied here, but couldn't find any way to achieve this.
Edit:
PS: I don't need to sort the table on load it should only sort the when the user clicks on the sortable column and should reset that sort upon clicking on an external button.
Ref JsFiddle: https://jsfiddle.net/9sydvo7g/12/
Any help is appreciated, Thanks