Hi,
Sorting single columns with custom function not working since 4.0.0.
Can you fix it please.
Thanks
Working fine on 4.1.2.
Did you set the sort type to 'custom' ?
Hi,
Thanks for reply
Yes, i set the sort type to 'custom', maybe it is the syntax that is not good (can you show me an example)
Or the problem is related to ng CLI
Provide a plunkr please;
Same problem here since PrimeNG 4:
http://plnkr.co/edit/R1CA3nLbBtBgPGIB9X3H
The function is being called properly, the error resides in that you need to change the data object reference in order to trigger the change detector. It can be as easy as adding:
this.data = [...this.data]
At the end of your sortByName function.
You can check the code working here @dolf-o-matric
http://plnkr.co/edit/vccp8YqlEY2dMuktNxrL?p=preview
Thanks a lot, it's working! :)
One of the very few working examples of datatable custom sorting that I could find. Thanks for posting.
Thanks a lot
Most helpful comment
The function is being called properly, the error resides in that you need to change the data object reference in order to trigger the change detector. It can be as easy as adding:
this.data = [...this.data]At the end of your sortByName function.
You can check the code working here @dolf-o-matric
http://plnkr.co/edit/vccp8YqlEY2dMuktNxrL?p=preview