Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async/backend table filtering #104

Open
dflock opened this issue Mar 13, 2023 · 6 comments
Open

Async/backend table filtering #104

dflock opened this issue Mar 13, 2023 · 6 comments

Comments

@dflock
Copy link

dflock commented Mar 13, 2023

Thanks for your hard work on this great UI framework! The support for async sorting for the table component is great - allowing backend sorting. It seems that there's no support currently for async filtering, to allow the backend to do the filtering? Something similar to the async sorting for filtering would be a great addition!

@iamgabrielsoft
Copy link

You have an idea of any UI framework with this feature?

@dflock
Copy link
Author

dflock commented Mar 30, 2023

Yes, off the top of my head, PrimeVue, Naive UI & Quasar both support this on their data table components.

@antoniandre
Copy link
Owner

Hi @dflock, thanks for your feedback and request.
I've been willing to answer you earlier but wanted to take a closer look before I do.
I am not sure I understand the purpose of having a backend filtering integrated in the table.
Having a frontend filter function is a nice thing for fast instant sorting of the same table rows already loaded.
But if you sort the rows from a filter box outside of the table and it does a query to the backend then gets different rows to display in the table, why would you even need to pass the filter function to the w-table component?
If it is just to have the loading bar, there is already a loading prop.
It seems useless to me if everything is external, but maybe I need to see your UI to understand it :)

@iamgabrielsoft
Copy link

@antoniandre those it mean your not moving further with the idea?

@antoniandre
Copy link
Owner

antoniandre commented Apr 1, 2023

I will if I am convinced of the added value - I just don’t see it right now but I am open to view your use case. I could be missing something.
for now the same feature is completely possible and not complicated from outside the w-table, using the filter example of the w-table documentation, you just need to call your backend and the rows received become the table items. While loading you can even use the loading prop. 🤷‍♂️

@DerrikMilligan
Copy link
Contributor

You can still do back end filtering. Just hook into the event for ordering and have your filters pull new data to be rendered in the table.

I'm currently using the w-table component with filters that connect to the backend. It's not something that is fully managed by the w-table, but you can achieve something similar using the fetch method if you want to try and use the w-table for everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants