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

    q-table filtering

    Framework
    4
    9
    9300
    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.
    • F
      fcereja last edited by

      Hello all,
      I’m looking for a while to find some information about using filtering in a q-table. I’ve simply have a column with a boolean and I want to display only the lines which have the boolean set to true or set to false.
      The online documentation describes the filtering with “filter” and “filter-method” but the example says “see source-code” but there is no example with this topic.
      Anybody with some information will be welcome.
      Regards
      Francis

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

        You should give the filter-method a method that filters on what you want to filter on using whatever your data is. It’s that simple. 😄

        If you put together a codepen, I’ll show you.

        Scott

        1 Reply Last reply Reply Quote 0
        • F
          fcereja last edited by

          Hi Scott,
          I’ve set a codepen at https://codepen.io/fcereja/pen/NWqVXXY do you have access to it with this URL ?
          The two toggles set the filter conditions, how to make the link with the q-table ?

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

            @fcereja - This seems to be working.

            https://codepen.io/smolinari/pen/ZEGNPOK?editors=1010

            First thing, it wouldn’t have worked with q-options-group because you need to toggle the one option off, when the other one is on.

            Second, you didn’t even really try to solve the problem, did you? 😄

            At any rate. Problem solved.

            Scott

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

              @s-molinari - Effectively it works well, thank you very much for your help.
              After reading your example, it seems quite evident. Regarding the toggles, when both are active, the table is simply not filtered.
              I really tried to solve the problem but I didn’t understand how to apply the filtering.

              I gess thet a little example in the documentation will help newbies.

              Have a nice week-end
              Francis

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

                Unfortunately, there are so many things you can do with QTable (and many other components). I’m in three different community conversations at this moment about how to do things additionally to the standard QTable functionality. What we need is a way to capture the examples people come up with (like me) and offer them as extra examples to discover in the docs. We’re working on that idea slowly but surely. 🙂

                Scott

                1 Reply Last reply Reply Quote 0
                • L
                  lnguyenkhang36 last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • W
                    wpq last edited by

                    @s-molinari

                    We’re working on that idea slowly but surely

                    Is there a place where one can contribute with such examples/snippets?

                    I really like quasar but I am an amateur home dev, so I reinvent the wheel quite often. I would love to dump some working examples of simple things I did (beyond the ones found in the examples).

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

                      @wpq - No. Sorry. We are getting closer, but aren’t there yet. It will be a while still too.

                      Scott

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