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

    How to get q-search to search when clicking on magnifying lens?

    Help
    2
    3
    803
    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.
    • ssuess
      ssuess last edited by

      I have tried a ton of variables, but none of them work. I just want the standard search to work not only when I hit enter, but also when I click on the left hand magnifying lens icon. Here is my current code:

      <q-search v-model="search" inverted stack-label="Search for people" @keyup.enter="doSearch()" />
      
      1 Reply Last reply Reply Quote 1
      • ssuess
        ssuess last edited by

        For those that need an answer to this, I solved it by not using q-search, but instead configuring a q-input text field like so:

        <q-input
          v-model="search"
          type="text"
          inverted stack-label="Search for people"
          @keyup.enter="doSearch()"
          clearable
          :before="[
            {
              icon: 'search',
              handler () {
                doSearch()
              }
            }
          ]"
        />
        
        1 Reply Last reply Reply Quote 1
        • P
          PrinceMackaroo last edited by

          Thank you for this, that works perfectly 🙂

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