You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ component.name }} <!-- Simply to show that component.name fails to update. --><inputbind:value="component.name"/><script>exportdefault{data(){return{component: {name: "world"}}}}</script>
The initial render will work successfully, but when you attempt to change the value of component.name via the input, component.name does not update.
This seems to be caused by the $X_change_handlergetSetter method using the name of the variable, without checking to see if it's been used before.
It seems like this would need multiple changes in order to get working.
Changes would need to be made to generators/dom/visitors/shared/binding/getSetter.js and utils/flattenReference.js (possibly others as I haven't fully investigated all locations) in order for name and keypath to be the correct.
It doesn't seem possible for this issue to be resolved by renaming the render_main_fragment argument component as any other name could, in theory, be used.
Workaround
Don't use component as a property name, currently using _component 😉
The text was updated successfully, but these errors were encountered:
Example
<input>
REPL example
<select>
REPL example
Explanation
The initial render will work successfully, but when you attempt to change the value of
component.name
via theinput
,component.name
does not update.This seems to be caused by the
$X_change_handler
getSetter
method using the name of the variable, without checking to see if it's been used before.It seems like this would need multiple changes in order to get working.
Changes would need to be made to
generators/dom/visitors/shared/binding/getSetter.js
andutils/flattenReference.js
(possibly others as I haven't fully investigated all locations) in order forname
andkeypath
to be the correct.It doesn't seem possible for this issue to be resolved by renaming the
render_main_fragment
argumentcomponent
as any other name could, in theory, be used.Workaround
Don't use
component
as a property name, currently using_component
😉The text was updated successfully, but these errors were encountered: