Skip to content

RowSorter doesn't sort numberStr in scientific notation correctly #6388

@lukaw3d

Description

@lukaw3d

When using columns with type: "numberStr", the numbers written in scientific notation (1.3e-12) are parsed/sorted badly.

Example

Plunkr example

Results in the example:

numberStr sorted 🔼 expected results 🔼
0.64 6.4e-9
6.4e-9 6.4e-6
6.4e-6 6.4E-5
6.4E-5 0.64
6.4 6.4
64 64
6400 6400

Cause

This is caused by filtering out all non-number characters, before calling parseFloat in rowSorter.sortNumberStr

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions