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

Use orthogonal data for DataTables #865

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

alistair3149
Copy link
Contributor

@alistair3149 alistair3149 commented Nov 23, 2024

This will make DataTables easier to expand and maintain. Now we can assign different attributes to the data, and this will resolve any sorting and filtering issues that we had.

Added

Instead of assigning HTML directly as data, we can assign an object with the following keys:

  • display - The display value of the data (same as what we had)
  • filter - Value used for filtering (e.g. SearchBuilder)
  • sort - Value used for sorting

Removed

  • any-number - Not needed anymore because sort key are always sortable
  • datatables-column.type - Same reason as above

https://datatables.net/manual/data/orthogonal-data

Fix #831

Instead of assigning HTML directly as data, we can use assign an object with the following keys:

- display - The display value of the data (same as what we had)

- filter - Value used for filtering (e.g. SearchBuilder)

- order - Value used for sorting

This will make DataTables easier to expand in the long run. Since we can assign different

attributes to the data.

Also fixes SemanticMediaWiki#831
We don't need it anymore because values are assigned a sorting key
@JeroenDeDauw
Copy link
Member

Looks good. @thomas-topway-it can you also check this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[datatables] Datatables should sort Quantity data numerically
2 participants