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 access the row index in a data table?

    Help
    2
    3
    3879
    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
      lvaylet last edited by

      I went through the documentation looking for an option to access the index of a row in a data table, but could not find any.

      I tried the following with scope="row" and then {{ row.index }}:

      <q-data-table ...>
        <template slot="col-error" scope="row">
          <q-icon name="error" size="2em">
            <q-tooltip>{{ row.index }}</q-tooltip>
          </q-icon>
        </template>
        ...
      </q-data-table>
      

      I also tried {{ row.$index }} with no success.

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        Hi,

        When in doubt, why don’t you put just {{ row }} in the QTooltip? You will notice an __index property. That’s what you are looking for.

        -Razvan

        1 Reply Last reply Reply Quote 0
        • L
          lvaylet last edited by

          Right, my bad. I will keep this in mind.

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