Skip to content

children should not have changes when data is set during parent instantiation - #120

Open
nemophrost wants to merge 3 commits into
AmpersandJS:masterfrom
nemophrost:childChanged
Open

children should not have changes when data is set during parent instantiation#120
nemophrost wants to merge 3 commits into
AmpersandJS:masterfrom
nemophrost:childChanged

Conversation

@nemophrost

Copy link
Copy Markdown

By have changes I mean calling .hasChanged() should not return true.

@nemophrost

Copy link
Copy Markdown
Author

Not sure this is best place for solving the problem.

Another idea is at line 146, setting this[attr]._changed = {} for children (like what is done at the end of the Base constructor). This seems worse to me though because then it would be changing "private" attributes on something other than itself.

Yet another option could be to pass along the initial data for the child to _initChildren and exclude that from the data being set during instantiation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants