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

    Disable highlight on q-item

    Help
    3
    4
    1809
    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.
    • S
      silvain last edited by

      Hi,

      i’m using a q-list without “highlight” but when i use to="…" on a q-item the highlight is still use on that specific q-item. Is it possible to disable the highlight?

      Silvain

      1 Reply Last reply Reply Quote 1
      • S
        silvain last edited by

        Anyone? I looked at the source code of quasar framework but can’t figure out how to solve it.

        <q-list>
        <q-item to="…">

        This will result in the q-item element being highlighted when selected on desktop browser. Also, when I scroll a page on the safari browser on ios and it contains a lot of q-items then the user sees the highlighted item. I don’t want the user to see this.

        1 Reply Last reply Reply Quote 0
        • D
          DerekM last edited by DerekM

          Hopefully you’ve found the answer after 9 months of waiting but here is a solution.

          In q-item set the “active-class” to a style that is empty. <router-link> will always apply the active style to the active item but that just means the style that will be applied will have no style, and thus the active item will not be highlighted.

          <q-item :to="{name:'home'}" active-class="q-item-no-link-highlighting">
                 <q-item-side icon="fas fa-home"></q-item-side>
                 <q-item-main label="Home"></q-item-main>
           </q-item>
          
             .q-item-no-link-highlighting { }
          
          1 Reply Last reply Reply Quote 0
          • S
            steve last edited by

            instead of using the “to”, why don’t you simply add a @click event and then push to where you need to go?

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