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

    QTable select row when clicking row

    Framework
    3
    3
    957
    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.
    • R
      reath last edited by

      Currently in order to select a row I must click on the tick box to the left. Is there an easy way to make so that it doesn’t matter where I click in order to select a row?

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

        @reath on your <q-tr ... :props="props" @click.native="props.selected = !props.selected">...

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

          @metalsadman, that’s a great tip, thanks! I was just looking for that.

          One question though - in this case, when using q-tr with q-td in a body slot, it seems that I will need to effectively rewrite the whole implementation of the body row, e.g.:

          <template v-slot:body="props">
            <q-tr :props="props">
              // 1. the td for the selection column with the q-checkbox and all the logic
              // 2. all other tds for all other columns
            </q-tr>
          </template>
          

          while by default all of this is done by Quasar. So my question is - is there a more efficient way to just make a row clickable, without rewriting the complete default implementation of the body row slot?

          Thank you in advance!

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