mattiash / angular-tablesort

Sort angularjs tables easily
MIT License
184 stars 66 forks source link

Return 0 instead of null in number filters (unless the value is NaN) #106

Closed kcaran closed 6 years ago

kcaran commented 6 years ago

I'm having issues sorting with negative numbers, both integers and floats. The parseInt and parseFloat filters are returning 'null' instead of zero, so zero values are separated from the non-zero values.

Instead of

-4 -2 0 0 1 3

I get

0 0 -4 -2 1 3

mattiash commented 6 years ago

Thank you!