mariuszfoltak/angular2-datatable

mfDefaultSorter for numeric types

Closed this issue · 2 comments

<mfDefaultSorter by="id">ID</mfDefaultSorter> sorts alphabetically (1,11,12...,2,21), not as number (1,2,3 ...,11,12).

Maybe add a param type to mfDefaultSorter?

My fault, _.orderBy() inside orders according to data type :-), so converting to number helped.

How did you convert to number?