Data table sorts numbers incorrectly

unhandled

#1

Hi Andrew,

The sorting of number columns in HUI data tables seems to be incorrect. I have a column containing the integers 1 through 19, which when I sort smallest to largest appear as below:

1
10
11
12
13
14
15
16
17
18
19
2
3
3
4
5
6
7
8
9

So it appears it is sorting them as strings i.e. on a digit-by-digit basis.


(Andrew Heumann) #2

yes, at present that component only accepts string data. image


#3

I see, thanks for the reply. I will have to manually sort the data before displaying it for the time being.

If you need help testing any updates to it in the future let me know :pleading_face: :wink:

Thanks again for your work!


(j porral) #4

Maybe pad your text with a zero? (ie. “01”, not “1”)


#5

Good idea, although I don’t think that will solve the issue if a list contains both positive and negative numbers. Thank you though