x-modelable allow the sub-component to set the default #3591
mwnciau
started this conversation in
3. Feature Ideas
Replies: 1 comment 1 reply
-
|
does the parent need to have a value to start with?
I kind of feel it should also ahve a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Given the following:
The output will always be "parent". I'd like to do something (e.g.
x-modelable.defaultorx-model.unobtrusive) so that the output will be "child" by default. This is useful, for example, if the child component has some complicated logic to set the default, and I want the parent to be able to read, but not necessarily write that variable.x-initalso triggers before the parent changes the modelled value, so the only solution currently is to have$nextTickinside ofx-initwhich seems messy.Beta Was this translation helpful? Give feedback.
All reactions