codecombat / treema

jQuery plugin that generates HTML interfaces to edit JSON data defined by json-schema.
http://codecombat.github.io/treema/
MIT License
152 stars 36 forks source link

Updating a boolean field in the tree is not updating the data #5

Closed fredang closed 10 years ago

fredang commented 10 years ago

To reproduce the issue:

By looking at the source code, it seems that somehow, updating a BooleanNode does not trigger the refresh of the data of its parent node. It might not be the best way to fix that but adding the following call in the method BooleanNode.toggleValue: this.flushChanges(); seems to fix the issue.

sderickson commented 10 years ago

You are indeed correct! Thanks for pointing this out, it's now fixed.