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

Question: how to handle multiple queries and pagination #761

Open
seankndy opened this issue Jan 1, 2022 · 0 comments
Open

Question: how to handle multiple queries and pagination #761

seankndy opened this issue Jan 1, 2022 · 0 comments

Comments

@seankndy
Copy link

seankndy commented Jan 1, 2022

Say I have a page that has “tasks” listed in two separate sections, one section shows completed and another show incomplete. Each section has its own unique sorting and pagination for the tasks that can be manipulated independently.

How would this be handled in vuex orm? I have to run two api calls to the server so I can get the two sets of data using the appropriate sorting and pagination. If I shove both sets of data into vuex orm the custom sorting and pagination would be lost and even if I could make it work in vuex orm I’d be filtering and sorting data again after the server already did that.

Also say the user navigates off the tasks page, would I call a series of deletes on the orm to remove those or is there a better way to clean up after yourself? The very simplistic “todo” example apps are not real world at all. If you know of a project on GitHub that does these exact sorts of things I would love to see it. Thank you!

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

1 participant