No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Qinput v-model dont get updated

    Help
    4
    4
    1392
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      Epo last edited by Epo

      Hello,

      i am using a simple QInput for typing in a number. After the user input i check the value and call a function with the @change event. In the debugger the variable gets the correct value, but in the input field there are no changes by using v-model. Only when the input field lose the focus, then it gets updated.

      <q-input v-model=“deadline” type=“number” stack-label=“Tage” @change=“checkDays()”/>

      checkDays () {
      if (this.deadline >= 1000) {
      this.deadline = 1000
      }
      }

      What i’m doing wrong?

      1 Reply Last reply Reply Quote 1
      • R
        rv last edited by

        Not tested but instead of @change can you try v-on:keyup="checkDays()".

        1 Reply Last reply Reply Quote 0
        • F
          fakx last edited by

          Hi all,
          I have the same problem, here is a codepen: https://codepen.io/alexanderkoehn/pen/poEorwx
          The curious thing is: When there is an additional normal input or a second q-input, everything works as expected.
          Using only a <input /> works too.

          Regards

          1 Reply Last reply Reply Quote 1
          • A
            Alexander Lunev last edited by

            I have the same problem with Q-Input and v-model. If user doing input in field and then pressing arrow keys (which is changing v-model value), text in Q-Input not changing. Changed field to <input />.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post