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

Does using ReactiveTable.publish automatically paginate on the server side? #442

Open
Broham opened this issue Oct 24, 2016 · 3 comments
Open

Comments

@Broham
Copy link

Broham commented Oct 24, 2016

Say my collection has 10,000 rows and I have a page size of 50 - do I need to include the logic for selecting only the records for the current page in the collection parameter, or is this done automatically?

So would the code below:

ReactiveTable.publish("paginatedData", myData)

return 50 rows to the client, or all 10,000? In my settings I am specifying both currentPage and rowsPerPage.

I read through the docs, but wasn't quite sure how it behaved

@aslagle
Copy link
Owner

aslagle commented Oct 24, 2016

It's automatic, it only returns the rows for the current page.

@aessig
Copy link

aessig commented Oct 27, 2017

@aslagle but there is still the issue that everything is published to the client #467 and the first loading take a while, when having a big database. Anyway it could be changed to only publish the wanted rows ?

@goolz
Copy link

goolz commented Jan 1, 2019

I had a same problem. the problem is issue with
fullCursor.observeChanges

try to disable observeChanges by using the followed setting:

{
  disablePageCountReactivity: true
}

also you can add disableRowReactivity: true to the setting

full publish code would be like this:

ReactiveTable.publish("publishName", collection, {}, {
  disablePageCountReactivity: true,
  disableRowReactivity: true
});

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