You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug (required)
A new number sort function was added to sortTypes to handle numbers since the default alphanumeric sort type does not handle floats. However, the number sort function does not handle negative numbers and treats the negative number the same way as its positive counterpart because the numbers are converted to strings that then get stripped of the negative sign with this regex
Provide an example via Codesandbox! (required)
Use a new react-table codesandbox to reproduce the issue.
This create codesandbox link is not working ⬆️
Steps To Reproduce (required)
Steps to reproduce the behavior:
Have a column that has "number" as its sortType
Have values in the cell that are negative as well as positive
Try to sort
See error
Expected behavior (Recommended)
I would expect a sorting function that handles numbers to be able to sort negative numbers as lower values than positive numbers.
The text was updated successfully, but these errors were encountered:
This issue has been detected as stale and automatically closed. It's very likely that your issue has remained here this long because it would require breaking changes to v7. React Table v8 is currently in alpha (soon beta!) and already contains bug fixes, performance improvements and architectural changes that likely address this issue.
If your v7 issue has been previously labeled as requiring breaking changes, please try the new v8 alpha/beta releases
If your v7 issue has not already been labeled as a breaking change, open a new issue.
If this was a v8 issue and was closed by mistake, please reopen or leave a comment below.
Describe the bug (required)
A new number sort function was added to sortTypes to handle numbers since the default alphanumeric sort type does not handle floats. However, the number sort function does not handle negative numbers and treats the negative number the same way as its positive counterpart because the numbers are converted to strings that then get stripped of the negative sign with this regex
Provide an example via Codesandbox! (required)
Use a new react-table codesandbox to reproduce the issue.
This create codesandbox link is not working ⬆️
Steps To Reproduce (required)
Steps to reproduce the behavior:
sortType
Expected behavior (Recommended)
I would expect a sorting function that handles numbers to be able to sort negative numbers as lower values than positive numbers.
The text was updated successfully, but these errors were encountered: