-
Notifications
You must be signed in to change notification settings - Fork 12
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
Filtered fields not listening bug #28
Comments
The only workaround i found for now is using @filterChildren instead of filter for maps, arrays, collections, it will create empty fields which are fluiding the data but at least it's working. This doesn't apply to direct schema objects as using filterChildren will not work: |
This seem to be the same case with colyseus/schema#155 where listener is not initialized because it recieves an undefined value instead of some object to listen for. |
Hi @elfwy-uwu, the original issue you reported ( As discussed on Discord, filters are experimental, and it is not planned to have a fix for this issue at this time. The plan is to introduce a different "data ownership" model next year, and deprecate the filters 🤞 As you suggested, here's a thread about the known issues with filters 🙌 colyseus/schema#163 |
In case client gets server state with filtered field for the first time (during initialization process in function 'registerCallbacksOnStructure'), and then gets the same unfiltered field, this will throw an error:
This prevents filtered fields from listening and breaks registerCallbacksOnStructure loop chain resulting in even existing fields to fail listening.
The text was updated successfully, but these errors were encountered: