brunano21 / angular-4-data-table

An Angular 5 data table, with pagination, sorting, expandable rows, row selection, etc. with basic accessibility support.
MIT License
11 stars 19 forks source link

Custom sort function #16

Closed suse0 closed 6 years ago

suse0 commented 6 years ago

Hi Bruno thanks for your work and packaging this Component!

Is it possible to add not only a flag "sortable" to a column, but also a custom function? In our project we've got complex contents. E.g. a "Beleg": It may have a date, but not always, and as an id a composite number or a string, which we all string together with a pipe.

I'm looking forward to your answer. Thank you in advance. Regards Susanne

brunano21 commented 6 years ago

Hi Susanne,

you could try extending DataTableResource and override query() function.

suse0 commented 6 years ago

Thank you for your advice.