You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
If not, said workaround for could maybe be incorporated into the official documentation or even get a "cleaner" API.
I agree with you that a cleaner API and having this limitation stated in the docs would be nice.
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: