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

onChange() fires only once if a child object referenced multiple times in a watched object is modified #110

Open
dddpt opened this issue Jul 11, 2024 · 0 comments

Comments

@dddpt
Copy link

dddpt commented Jul 11, 2024

Hi all!

I am not sure if this is a bug or a feature.
I'll call it a bug as I would have expected a different behavior.

Current behaviour:

  • I have a child object (let's call it multiRefChild) referenced at multiple places in a watched object obj as obj.child1 and obj.child2.
  • If I change a property a in the obj.child1 it fires an onChange() event for the obj.child1.a path, but not for the obj.child2.a path, even though obj.child2.a has also changed.

Expected behaviour:

  • If I change a property a of the obj.child1 it fires an onChange() event for the obj.child1.a path as well as the obj.child2.apath.

Working example

Is this a bug or a feature?

If it's a feature, it might deserve a mention in the readme ;-)

Thanks for the library and for your time!

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

1 participant