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
Using this code, which sets model-value to the reactive prop firstName:
And referencing the documentation that says model-value "Gets updated on text input."
However, we can see in the app, the values marked by the red arrows on the left are different. If the reactivity was bidirectional, I would expect the {{ firstName }} in the template to track the value in the input field.
Further, we can see in the console.log that the event param str tracks the value, while firstName.value does not change.
I can get my desired behavior by changing the definition of w-input to this:
and processing the event param like this:
However, this looks more like one way reactivity than two way to me. I would have expected the values marked by the red arrows on the left to be the same.
Using this code, which sets model-value to the reactive prop firstName:
And referencing the documentation that says model-value "Gets updated on text input."
However, we can see in the app, the values marked by the red arrows on the left are different. If the reactivity was bidirectional, I would expect the {{ firstName }} in the template to track the value in the input field.
Further, we can see in the console.log that the event param str tracks the value, while firstName.value does not change.
I can get my desired behavior by changing the definition of w-input to this:
and processing the event param like this:
However, this looks more like one way reactivity than two way to me. I would have expected the values marked by the red arrows on the left to be the same.
Original code:
package.json, snipped
The text was updated successfully, but these errors were encountered: