question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: table sort error when the number is negative, and the value type I give is `Number`

See original GitHub issue

bug: 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:closed
  • Created 6 years ago
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
tmorehousecommented, Jun 11, 2017

From my devtools console on chrome: image image

See details at MDN String.prototype.localeCompare(): https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare

0reactions
tmorehousecommented, Jun 29, 2017

v0.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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found