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.
You should give the
filter-methoda 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.
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 ?
s.molinari last edited by s.molinari
@fcereja - This seems to be working.
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.
@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
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.
This post is deleted!
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).
@wpq - No. Sorry. We are getting closer, but aren’t there yet. It will be a while still too.