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

Publish/Subscribe Large collections #20

Open
dfuchs2512 opened this issue Jul 28, 2015 · 1 comment
Open

Publish/Subscribe Large collections #20

dfuchs2512 opened this issue Jul 28, 2015 · 1 comment

Comments

@dfuchs2512
Copy link

Hello,

I'm working on an Web App which is using the webix ui. I use the datatable. For the URL proxy I have a cursor with a find function on my collection to return all documents. I just need to read the data from the collection. My problem is that my collection contains about 10.000 documents. I was trying with the option datafetch etc. to limit the data preloaded. The problem is that as long as data are send via DDP to minimongo I can not click any line of the datatable. Just until all data are loaded its possible. I wanted to give the user a quick initial load with part of the data and after do a lazy loading in the background.
I use iron-router waiton function to retrive the data via Subscribe.

Is there a way to load just the first 100 documents into the webix datatable ui and later the rest dynamic in the background without loosing the possibility to click somewhere before all data are loaded?

I think its something with the proxy I use. Can I use a limit option on the proxy cursor for the first 100 documents but keep them loading all data afterwards in background?

Thanks for any hint.

Daniel

@dandv
Copy link
Owner

dandv commented Aug 15, 2015

Using the proxy like here, you could set skip and limit.

I've also updated the CRUD example to include nimble:restivus - the recommended REST API package for Meteor. You can set up the Datatable to use Meteor's collections at API endpoints with dynamic loading.

Keep an eye on at this issue for paging in nimble:restivus; in the meantime you can implement the start and count query parameters that Webix will pass - see https://github.com/kahmali/meteor-restivus#thisqueryparams.

The downside of connecting Webix components to the REST API this way is lack of reactivity.

@mkozhukh: any ideas?

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

2 participants