shzlw/poli

Table ordering does not work

g-adamante opened this issue · 3 comments

Hey! Thanks for the amazing work with Poli. It fits my needs perfectly :)

I'm having some problems ordering tables like this, through:

image

They are never properly ordered when the value is numeric, the only thing that works is alphabetical ordering.

Any thoughts on how to solve this?

Thanks!

shzlw commented

Thanks for using Poli! I guess the issue is probably caused by the data type of table cell always being converted into string and there is no custom sort function added for each column. I will need to take a look.

shzlw commented

In the new patch v0.12.2, I only fixed the number ordering in table. For use cases like $120, because the column type is changed to string after the prefix is added, it will still be sorted in alphabetical order. Additional prefix/postfix configs will need to added later to 1. use the original column type number for sorting 2. render the prefix/postfix + value in display.

Cool!! Thanks for the fix.