- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
QInput with mask incorrectly caching modelValue and not updating when prop changes #12638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
area/components
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-webpack
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
Comments
Just as a quick solution:
|
pdanpdan
added a commit
to pdanpdan/quasar
that referenced
this issue
Mar 3, 2022
…s changed from the cached one quasarframework#12638 quasarframework#12638
pdanpdan
added a commit
to pdanpdan/quasar
that referenced
this issue
Mar 8, 2022
…s changed from the cached one quasarframework#12638 quasarframework#12638
pdanpdan
added a commit
to pdanpdan/quasar
that referenced
this issue
Mar 8, 2022
…s changed from the cached one quasarframework#12638 quasarframework#12638
pdanpdan
added a commit
to pdanpdan/quasar
that referenced
this issue
Mar 9, 2022
…s changed from the cached one quasarframework#12638 quasarframework#12638
pdanpdan
added a commit
to pdanpdan/quasar
that referenced
this issue
Mar 9, 2022
…s changed from the cached one quasarframework#12638 quasarframework#12638
Fix will be available in Quasar v2.6.0 and v1.18.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/components
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-webpack
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
Using a
QInput
with a mask, I am attempting to transform the input value to an uppercase string before updating the model value. When using a mask, the text in the input field does not correctly reflect the now uppercase model value.The last example in the reproduction CodePen binds its
modelValue
to theQInput
'skey
, forcing a re-render of the component when the value changes. This results in the mask being updated. It seems like the initial value of themodelValue
prop is cached and then treated as the source of truth internally, and later updates to themodelValue
prop are ignored.What did you expect to happen?
When the
update:model-value
event is fired, and the code in the callback transforms the new value to uppercase and updatesmodelValue
, theQInput
with themask
prop set should update the rendered input string to take into account the new model value.Reproduction URL
https://codepen.io/euphemism/pen/yLPGbea?editors=1000
How to reproduce?
modelValue
and how it does not match the text in the fields (Excepting the first, non-masked input field, and the last field which is forcibly re-rendered on model change).Flavour
Quasar CLI (@quasar/cli | @quasar/app)
Areas
Components (quasar)
Platforms/Browsers
Firefox, Safari, Microsoft Edge
Quasar info output
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: