HC200ok / vue3-easy-data-table

A customizable and easy-to-use data table component made with Vue.js 3.x
MIT License
536 stars 105 forks source link

feat(sort): add props for custom sorting #329

Open jxn-30 opened 1 year ago

jxn-30 commented 1 year ago

This is a feature proposal that adresses #177

The following new props have been added:

sort-function

takes the following arguments:

it should return a number, if a nullish (undefined and null) is returned, the default sort function will automatically be applied.

multi-sort-function

takes the following arguments:

it should return an Item[] (Array of Item-Objects). There is no "fallback to default if undefined returned" as for sort-function to allow more controll over the sorting.