SemanticMediaWiki / SemanticResultFormats

Provides additional visualizations (result formats) for Semantic MediaWiki
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Result_Formats
Other
45 stars 75 forks source link

[datatables] Datatables should sort Quantity data numerically #831

Open alistair3149 opened 2 months ago

alistair3149 commented 2 months ago

Setup

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 commented 1 month ago

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