q-table sorting order using mutated vowels



  • Is there a way to set proper lexical order in q-table for UTF-8 strings with mutated vowels using props or do I need to set an explicit method for sorting? If so, is a reviewed solution available?



  • @SB

    What is the current sorting of UTF-8 in tables with mutated vowels? Could you give an example of what it is now and what you think it should be? Preferably in a codepen.io ( very easy to do , just extend a quasar table example codepen)



  • @dobbel Data is fetched via GraphQL, column name is name. In my case QTable and QSelect using the same data source. For QTable sorting is set by pagination: { sortBy: 'name', descending: false }. Here is the result for QTable:

    Screenshot_2020-11-20 InfoSys.png

    Here is the proper result for QSelect:

    Screenshot_2020-11-20 InfoSys(1).png



  • @SB

    If you think there’s something wrong with the ordering Quasar does you should post a github Issue to bring this to the attention of the Quasar staff. Wrong does not mean wrong for your use case but generally wrong.

    If not than indeed, there is nothing else you can do than create your own sort function.



  • @SB I would try to use LocaleCompare. In columns:

     {
        name: 'name',
        label: 'Name',
        field: 'name',
     
        sortable: true,
        sort: (a, b) => a.localeCompare(b, 'de'),
      },
    


  • @dobbel, @beets Thank you for your replies. In my case

    sort: (a, b) => a.localeCompare(b, 'de')
    

    is the solution.


Log in to reply