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
-
Given the following:
The output will always be "parent". I'd like to do something (e.g.
x-modelable.default
orx-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-init
also triggers before the parent changes the modelled value, so the only solution currently is to have$nextTick
inside ofx-init
which seems messy.Beta Was this translation helpful? Give feedback.
All reactions