-
Notifications
You must be signed in to change notification settings - Fork 9
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
observables are never stopped #4
Comments
Storing it in the proxy is not enough, because a new proxy is created every time. Storing it in the view itself does the trick. |
Yep, I see the issue |
Also, if you need to load data only, without full sync then you can use |
Hi Maksim
I'm using your meteor data proxy, but it seems the query handle created by cursor.observe is not stopped when you call load on the same object again (e.g. to load other data in the component).
From the meteor docs:
"observe returns a live query handle, which is an object with a stop method. Call stop with no arguments to stop calling the callback functions and tear down the query. The query will run forever until you call this."
As a result, when the original data changes, the observable still tries to update the view, but its data has changed, resulting in an error.
I believe this could be resolved by storing the returned object from this.cusor.observe in this.query and before creating a new query calling this.query.stop() if this.query is already set.
I'm not sure destroying the webix object cleans this up either, it might result in memory problems.
The text was updated successfully, but these errors were encountered: