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
Here:
1.As it supposed to be, we can't write any text except numbers but our cursor moves at the end when we try to.
2.When we type at the middle of the text, our cursor moves at the end.
3.Input and model values are always the same.
Now with no-model-value-strict-sync property:
2024-02-28.18.07.57.mov
Here:
1.We are able to write anything we want.
2.Blur event change our text to the last correct one. As it seems to me, this is not user-friendly.
Since we've already implemented properties that lets us control user's input such as :error, :message, :success I think we don't need to control it additionally with @update:model-value.
Hence, we could simplify our <input/> by using v-model="model" in it instead of passing :value and @input. By that, we will be always sure that our model and input values are always synced.
Note:
1.We have to consider how it would affect in already used components in our projects since it's a backward incompatible change.
2.Special cases such as above one when we try to control user's input by passing callback.
The text was updated successfully, but these errors were encountered:
According to the following issue #539
This is how s-text-field works right now:
#Example
Our function that lets user write only numbers:
Pay attention that this limitation works only with :model-value, otherwise with v-model it doesn't.
Usage :
2024-02-28.17.58.25.mov
Here:
1.As it supposed to be, we can't write any text except numbers but our cursor moves at the end when we try to.
2.When we type at the middle of the text, our cursor moves at the end.
3.Input and model values are always the same.
Now with no-model-value-strict-sync property:
2024-02-28.18.07.57.mov
Here:
1.We are able to write anything we want.
2.Blur event change our text to the last correct one. As it seems to me, this is not user-friendly.
Since we've already implemented properties that lets us control user's input such as :error, :message, :success I think we don't need to control it additionally with @update:model-value.
Hence, we could simplify our
<input/>
by using v-model="model" in it instead of passing :value and @input. By that, we will be always sure that our model and input values are always synced.Note:
1.We have to consider how it would affect in already used components in our projects since it's a backward incompatible change.
2.Special cases such as above one when we try to control user's input by passing callback.
The text was updated successfully, but these errors were encountered: