Table sort issue: 0 before negative number

Steps to reproduce:

  1. Create a table, with data of [{k: 'a', v: 0},{k: 'b', v: 1},{k: 'c', v: -1}]
  2. Set v column type to Number.
  3. Click sort ascending on table, 0 will be placed before -1 like below

This bug happens only when I set v to Number.

Hey @hiep95!

This looks similar to the bug described here. Our devs are still investigating and we'll post an update in that thread when there's a fix. In the meantime, you might also try using a similar workaround. The number column displays more decimal places that the currency column by default so you might try using something like {{ self || 0.0001 }} instead of {{ self || 0.001 }} - the basic idea being to pass a decimal value small enough to render as 0 in the table.

Let us know if that works!

1 Like

Thanks for referring that. Although that workaround works for now, but since that issue is created 4-5 months ago, I think this bug should be fixed soon.

Hey there!

Fixes to column sorting were pushed with version 2.112.0, they should cover this issue but let me know if that's not the case :slightly_smiling_face: