Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[datatables] Datatables should sort Quantity data numerically #831

Open
alistair3149 opened this issue May 3, 2024 · 1 comment · Fixed by #833
Open

[datatables] Datatables should sort Quantity data numerically #831

alistair3149 opened this issue May 3, 2024 · 1 comment · Fixed by #833
Labels

Comments

@alistair3149
Copy link
Contributor

Setup

  • MW version: 1.39.7
  • DB (MySQL etc.): 10.11.7-MariaDB-1:10.11.7+maria~ubu2204
  • PHP version: 8.1.28 (fpm-fcgi)
  • SMW version: 4.1.3
  • SRF version: 4.2.1

Issue

Quantity type properties are sorted alphabetically instead of numerically in datatable, which is unexpected by the users.

Steps to reproduce

  1. Set up an inline ask query on a page
  2. Set format set as 'datatables'
  3. Add any properties with the Quantity type
  4. Save the page
  5. Click on the property in the table header to sort the column

Expected result:
The datatable should be sorted by that property numerically.

Observed result:
The datatable is sorted by that property alphabetically.

Example page with the issue: https://starcitizen.tools/Gun
The Damage, Range, and Muzzle velocity properties have the Quantity type.

@alistair3149
Copy link
Contributor Author

The latest commit did not fix the issue for us.
Perhaps any-number have troubles with units and number separators?

@krabina krabina reopened this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants