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

    QSideLink - Not Clickable

    Help
    3
    5
    1197
    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.
    • L
      lattamore last edited by benoitranque

      When a side link is marked as disabled it shows correctly being grey and cursor, but it is still clickable. How can we tell it to not go to the route and not be clickable?

      <q-side-link v-bind:class="{ 'disabled': !searchEnabled}" item :to="{name: 'customersearch'}" exact >
        <q-item-side icon="search" />
        <q-item-main :label="$t('customers.side-nav.customers.customer-search')" />
      </q-side-link>
      
      1 Reply Last reply Reply Quote 0
      • benoitranque
        benoitranque last edited by benoitranque

        Use pointer-events css attribute. Quasar comes with a helper class for it. Here is an example:

        <q-side-link :class="{ 'disabled': !searchEnabled, 'no-pointer-events': !searchEnabled }" item :to="{name: 'customersearch'}" exact >
          <q-item-side icon="search" />
          <q-item-main :label="$t('customers.side-nav.customers.customer-search')" />
        </q-side-link>
        

        Protip: :class is the same as v-bind:class and @click is the same as v-on:click

        Edit: see below post

        1 Reply Last reply Reply Quote 1
        • L
          lattamore last edited by

          Thank you for the help!

          Did you mean :class is the same as v-bind:class?

          benoitranque 1 Reply Last reply Reply Quote 0
          • E
            Epo last edited by

            v-bind:class --> :class
            v-on:click --> @click

            https://vuejs.org/v2/guide/syntax.html#Shorthands

            1 Reply Last reply Reply Quote 0
            • benoitranque
              benoitranque @lattamore last edited by

              @lattamore Yep my mistake there

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