You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I take the point - that isn't ideal. Unfortunately at the moment there isn't orthogonal data types in DataTables - ideally there would be a data type for the sort, another for the display, another for the filter, etc. However at the moment they are all lumped together into a single "type". This is much simpler and better for performance, but the down side is that we can get weird quirks like this.
For now, the solution is to set the class for the column to align the text left (dt-left would do).
Another option would be to use the enum plugin and have it sort on Gold, Silver, Bronze.
Sorry I don't have a better answer at the moment - orthogonal types is something I've been thinking about, but it isn't yet on the roadmap.
See https://codepen.io/fisharebest/pen/dPbPddq for a live example.
Adding
data-sort
to a column causes it to be formatted according to the type ofdata-sort
, rather than the type of the displayed value.Without
data-sort
, column one is left-justified and column two is right-justified - as expected.With
data-sort
, both columns are now right-justified - which is wrong. Changing the sorting shouldn't change the display.The text was updated successfully, but these errors were encountered: