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

    Q-range: How to show button on lazy model change

    Help
    2
    3
    265
    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.
    • M
      mas last edited by

      I’m trying to show an element on @change event in q-range.
      The following doesn’t work:

      @change="() => { showButton = true }"

      What am I doing wrong? This simple pattern works with @input event. Also, I want to use lazy model change only for displaying the button, but not for the model values rendered in labels or elsewhere.
      Thank you.

      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by metalsadman

        try <q-range :value="yourModel" @change="val => { showButton = true }; orCallOtherFunctionHere();" />, you can also do the same for @input, like so @input="firstFunctionCall(); secondFunctionCall();" or a statement @input="someFunction(); showButton = true".

        1 Reply Last reply Reply Quote 0
        • M
          mas last edited by mas

          metalsadman,

          Thank you for your suggestions, I have tried them all well previously and now I found the issue was that I was using lazy model change with @change event and v-model at the same time. Lazy @change works only without v-model. However, I wanted to render some changes via v-model in real time (like values on q-range labels when moving the slider), and display some elements, like buttons, only on lazy model change. I wonder if such a combination is possible?

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