No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [Solved] [V1] Table sorting strange behaviour

    Framework
    3
    4
    1285
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Marco last edited by Marco

      There is something strange about the ordering in the QTable examples in the documentation (V1)

      see Basic example

      It seems that by pressing on a column the sorting passes cyclically

      1. ascending
      2. descending
      3. not ordered

      It’s not what I expect.

      If I always click on the Calories column I expect:

      1. ascending
      2. descending
      3. ascending
      4. descending
      5. ascending
      6. descending
        …

      In the declaration of a column the sort field is defined as:
      function (a, b, rowA, rowB)
      Why not add a descending parameter (true / false)?

      The only example in the QTable documentation that behaves as I expect is the Custom sorting

      Did I miss something?

      1 Reply Last reply Reply Quote 0
      • T
        turigeza last edited by

        @Marco
        While others like myself expect it to behave as it does : )Or
        ascending
        descending
        not ordered

        For me this is the normal. Btw how would you clear the sorting (get to a not ordered state) if it was toggling just the two state ascending/descending ?
        I would say use the custom sorting as you pointed out.

        1 Reply Last reply Reply Quote 0
        • s.molinari
          s.molinari last edited by s.molinari

          Use the binary-state-sort prop.

          https://v1.quasar-framework.org/vue-components/table#QTable-API

          Scott

          M 1 Reply Last reply Reply Quote 1
          • M
            Marco @s.molinari last edited by

            Thank you @s-molinari !

            1 Reply Last reply Reply Quote 0
            • First post
              Last post