stationer / SortTable

A pure JavaScript (no dependencies) solution to make HTML Tables sortable
MIT License
37 stars 12 forks source link

Decimal values acting funny #9

Closed Sandbird closed 3 years ago

Sandbird commented 3 years ago

I am trying to sort some decimal values but it doesnt recognise them properly. For example the 85.17 should be up top.

Image

I tried to trick it adding the int value inside tags in the front but that didnt work either.

tyleruebele commented 3 years ago

A quick test works correctly for me. Are you setting the column type in the header?

<th class="js-sort-number">

If you are already doing that, can you send me the markup for the <table> for me to test with?

Sandbird commented 3 years ago

oh i had no idea you can do that. It's my fault really...i was using the min.js version. It works now :) thanks!

tyleruebele commented 3 years ago

Sounds like a bug in the README file. ;) I'll have to mention available sort types in the README.