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 Lazy Modifier?

    Help
    5
    8
    1585
    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.
    • D
      daveline last edited by

      Just curious if there is an issue with the lazy modifier on q-input? Typing seems to always trigger the change & input.

      Trim modifier works.

      Win 10, Chrome 60.0.3112.113, Quasar v0.14.4 Edge

      Here is my test code. See the console out

      <template>
        <div>
          <h3>"{{ junk }}"</h3>
          <h3>q-input</h3>
          Normal: <q-input type="text" v-model="junk" @input="input" @change="change" /><br>
          Lazy: <q-input type="text" v-model.lazy="junk" @input="input" @change="change" /><br>
          Trim: <q-input type="text" v-model.trim="junk" @input="input" @change="change" /><br>
          <h3>html/vue input</h3>
          Normal: <input type="text" v-model="junk" @input="input" @change="change" /><br>
          Lazy: <input type="text" v-model.lazy="junk" @input="input" @change="change" /><br>
        </div>
      </template>
      
      <script>
      
      import {
        QField,
        QInput
      } from 'quasar'
      
      export default {
        name: 'Lazy',
        components: {
          QField,
          QInput
        },
        data () {
          return {
            junk: 123
          }
        },
        methods: {
          change () {
            console.log('junk change')
          },
          input () {
            console.log('junk input')
          }
        }
      }
      </script>
      <style >
      
      </style>
      
      1 Reply Last reply Reply Quote 0
      • F
        fchabouis last edited by

        Yep, I confirm I noticed the same problem. QInput won’t be lazy.

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

          yes, same problem. Using .lazy seems not trigger the change event.

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by

            Can someone create an issue on Github, if not already done please?

            Scott

            1 Reply Last reply Reply Quote 0
            • rstoenescu
              rstoenescu Admin last edited by rstoenescu

              Vue’s v-model does NOT works with .lazy modifier when used on Vue components. This is not related to Quasar.

              1 Reply Last reply Reply Quote 0
              • rstoenescu
                rstoenescu Admin last edited by

                Reference: https://github.com/vuejs/vue/issues/6914

                1 Reply Last reply Reply Quote 0
                • rstoenescu
                  rstoenescu Admin last edited by

                  Use the equivalent form of v-model (with value and @input/@change).
                  Assuming you are using v1:

                  <q-input :value="model" @change="e => { model = e.target.value }" />
                  
                  1 Reply Last reply Reply Quote 2
                  • s.molinari
                    s.molinari last edited by

                    You learn something new every day.

                    Scott

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