swiss / styleguide

admin.ch styleguide
https://swiss.github.io/styleguide
MIT License
123 stars 37 forks source link

Tablesorter doesn't correctly sort special characters #535

Closed cstuder closed 6 years ago

cstuder commented 7 years ago

Proposal: Add sortLocaleCompare : true to the initialisation of the tablesorter:

(function($) {
  'use strict';

  $('.table-sort').tablesorter({ sortLocaleCompare : true });

}) (jQuery);

Problem: Umlauts and accents aren't sorted correctly by default by tablesorter.js. They get sorted at the end of the alphabet instead of correctly placing them in the list.

Tablesorter.js has the feature to handle this case correctly with the option sortLocaleCompare. But because the tablesorter gets initialised by main.js, end users can't overwrite the behaviour.