Server side pagination with search
See original GitHub issueI have a webpage where I’m listing some data from the database. There’s also a button that the users can press to load more stuff from the database. I’m trying to limit my query so not all the data get’s loaded to the client at once. The users can also search in the data.
My Query:
export default createQuery({
movies: {
$filter({filters, options, params}) {
filters.title = { $regex: new RegExp(`.*${params.title}.*`, "i") };
},
$paginate: true,
title: 1
}
});
Client:
export default withQuery((props) => {
return query.clone({
title: props.title,
limit: props.limit
});
}, {reactive: true})(Movies)
My problem is that the search only occurs in the limited documents and not in every document in the movies collection. Is there any way to fix this?
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
Server side pagination with Individual column searching
Hello all I am binding data using server side code which is working as expected, on top of it I am trying to...
Read more >React Table Pagination (Server side) with Search - BezKoder
In this tutorial, I will show you how to make React Table Pagination (Server side) with Search in a React Hooks Application using ......
Read more >Angular server side pagination and filtering - Level Up Coding
In this article, we'll learn how to use RxJS to implement server side pagination and filtering for a datatable in an Angular application....
Read more >Angular Material Serverside Pagination And Rxjs Search
angular-material-serverside-pagination-and-rxj. s-search. [Edit on StackBlitz ⚡️](https://stackblitz. com/edit/.
Read more >Client Side vs Server Side Pagination: How to Choose the ...
Client Side Pagination means that when a query is made, the server returns to the client all the data in one big chunk....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Twisterking @theodorDiaconu
I think I had something similar for an issue and believe I solved it by using scoped queries. It is an issue of pub-sub, but it seems to me the problem can be overcome with scoped queries.
I tried that idea in my own fork of grapher and it worked as expected. I used library from mitar, meteor-subscription-scope, and made some adaptation for grapher.
Example of usage:
Notice the scoped option for a query.
@theodorDiaconu If you are interested, I can make PR. This is the commit where I implemented that feature.
weeeeellll nevermind - I got it to work! 👍 One of those cases - should have properly read the docs! 😆