koalyptus / TableFilter

A Javascript library making HTML tables filterable and a bit more :)

Home Page:https://www.tablefilter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number & Date Columns doesn't sort correctly if "caseinsensitivestring" used (now sort as case insensitive STRINGS).

dbareis opened this issue · comments

A clear and concise description of what the bug is.

"string" columns are by default not case sensitive. On a table containing string, number and date columns (all sorting correctly, except case sensitive on the string column), add "caseinsensitivestring" to the sort extension (as demonstrated ONLY in a response to an issue raised in github, no example exists).

The string column now sorts as insensitive, but the number and date columns fail sorting and look like they are now sorted as case insensitive strings.

Reproduction steps:
Steps to reproduce the behavior:

  1. Start with: extensions: [{ name: 'sort' }],
  2. All columns work
  3. Change num: 1 to: extensions: [{ name: 'sort', types: ['caseinsensitivestring'] }])
  4. Only string columns work (case INsensitively)

Expected behavior
Date & Number sorting to remain unchanged.

Observed behavior:
Date & Number sorting appears to become sorted as case INsensitive STRINGS!

TableFilter version: 0.7.3
Browser and version: Chrome x64: Version 124.0.6367.202 (Official Build) (64-bit)
OS and version: Windows 11 [Version 10.0.22631.3593]

Additional information/context:

  • Problem started happening recently, didn't happen in an older version of TableFilter: UNKNOWN
  • Problem can be reliably reproduced, doesn't happen randomly: Yes