bug: table sort error when the number is negative, and the value type I give is `Number`
See original GitHub issuebug: table sort error when the number is negative, and the value type I give is Number
example:
- -0.1
- -0.2
- -0.3
- 0.1
- 0.2
- 0.3
The negative numbers above are sorted incorrectly.
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
Sort behaves strange for negative numbers with absolute ...
For me, both sort -nk1 and sort -gk1 (sort 8.20 complains about options '-gn' are incompatible when both are given) give the correct...
Read more >Why the number input is the worst input - Stack Overflow Blog
Either way when the number is invalid you can't get the actual value that appears on screen in the <input type="number"> field:
Read more >Fix text-formatted numbers by applying a number format
Format numbers stored as text as numeric values. Numbers that are formatted as text can cause problems with calculations or sorting.
Read more >Top 3 Excel Pivot Table Issues Resolved - MyExcelOnline
3. A Values field is Grouped within your Pivot Table. ... especially if you have positive and negative numbers that go into the...
Read more >Move all negative numbers to beginning and positive to end ...
An array contains both positive and negative numbers in random order. Rearrange the array elements so that all negative numbers appear before ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From my devtools console on chrome:
See details at MDN
String.prototype.localeCompare()
: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/localeComparev0.17.0 has now been released and this issue should be addresed.
Try out the latest, and if you run into issues/bugs, please create an issue