-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rerun filters #102
Comments
Hey @Steditor, Unfortunately, that is a limitation of the current filter implementation.
On the "agario-style" demo I've used the same workaround!
Thanks for reporting! |
Version 0.16 introduces the With Feedback is very welcome! |
In my application, a field is only synchronized to some clients that are specified to be admins of the room. The filter works fine as long as no client changes its state.
When a client newly becomes admin, the filter is not reapplied, as the filtered field has no changes. Currently I apply a workaround (manually touching the field in the schema's
$changes
) to trigger a re-run of the filter.This kind of defeats the purpose of having a declarative filter. A filter function that is re-run reactively as soon as a dependency changes would be awesome (kind of what UI frameworks like vue etc. do). However, this could potentially have a negative influence on the synchronization performance.
Is there a better way to force colyseus to send a client newly filtered data? If not, said workaround for could maybe be incorporated into the official documentation or even get a "cleaner" API.
The text was updated successfully, but these errors were encountered: