Sort does not work with negative numbers in a collection

Hi guys, I discovered something on the web. Sort does not work with negative numbers mixed with positive numbers. ( :rotating_light: If you have any questions, please ask, I’m willing to respond quickly unless I’m sleeping lol )

Example of a list Normal

1,65
-4,30
3
-8,85

How it looks in descending order:

3
1,65
-4,30
-8,85

How it looks in descending order (WEWEB):

3
1,65
-8,85
-4,30

Would anyone have a way to resolve this?

Extras:

I get the collection value with javascript and format it (I don’t know if this changes anything)

const value = context.item.data?.['ValueInTable']

const FormattedNumber = Number(value).toLocaleString('pt-BR', { minimumFractionDigits: 2, maximumFractionDigits: 2 });

return FormattedNumber+ "%"

How does it look in my table

image

seems to work with negative numbers fine for me.

image

Could it be the comma? yours has a dot

could be you could try removing all the formatting and adding it after sorting.