question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

QInput with type number loses reactivity to the model

See original GitHub issue

Describe the bug

Here, some special characters like e or . mess with the way Quasar handles its model on QInput with type number. It’s hard to explain, you’ll understand better when you see it: https://codepen.io/Louis99/pen/MWgpomo?&editable=true&editors=101

and also, it can happen this way too without the special characters: https://codepen.io/Louis99/pen/yLBMjMq?&editable=true&editors=101

It doesn’t seem like much but I believe it’s the source of other issues I’ve had that stem from this, where the reactivity of the component fails. Any thoughts on this? Thank you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoenescucommented, Aug 25, 2019

Hi Louis,

Please also use the .number modifier with v-model, as in: v-model.number="variable". Otherwise it won’t interpret that as a number but a String.

0reactions
rstoenescucommented, Sep 5, 2019

Fix will be available in v1.1.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shiny: input loses its reactivity if value is passed over a ...
reacts correctly when I type text manually in the input. In the server side, the function activated looks like this:
Read more >
Form input gets unfocused after typing in 1 character. #1853
When you input data into the input, the Field 's state changes => it rerenders => component is different => it rerenders =>...
Read more >
Why the number input is the worst input - Stack Overflow Blog
Chances are likely that you used the input type="number ” because you expected an integer to represent age or quantity. However, the number ......
Read more >
What you should know about Vue v-model - LearnVue
For a text input, this happens when our input loses focus. This reduces the number of times our v-model is trying to sync...
Read more >
Reactivity Fundamentals - Vue.js
It only works for object types (objects, arrays, and collection types such as Map and Set ). It cannot hold primitive types such...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found