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

    Handle selection of multiple rows in multiple QDataTables inside for loop

    Framework
    1
    2
    1542
    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.
    • T
      trsiddiqui1989 last edited by trsiddiqui1989

      I have a list of collapsible’s in a v-for, and a QDataTable component inside with multiple selection as below.

                  <q-collapsible :label="req.label" v-for="(req, index) in requisitions" :key="index" class="collapsible-no-padding requisitionContainer" @open="openRequisition('Requisition' + req.reqId)" @close="closeRequisition('Requisition' + req.reqId)" :id='"Requisition" + req.reqId'>
                    <q-list>
                      <q-item link class='ordersContainer'>
                        <q-item-main>
                          <q-data-table
                            :data="req.filteredOrdersList"
                            :config="orderConfigs"
                            :columns="orderColumns"
                            @selection="selectOrders">
                          </q-data-table>
                        </q-item-main>
                      </q-item>
                    </q-list>
                  </q-collapsible>
      

      It looks like this Image

      alt text

      However, since there are more than one table, if a selection is made on any of the tables, it does call the selection method with the selected item, but I have no way to tell which table is it a part of. This is a problem when a selection is removed, for which I need to distinguish between each tables selection event. Is there a way to do it?

      1 Reply Last reply Reply Quote 0
      • T
        trsiddiqui1989 last edited by

        I got the answer here.

        https://stackoverflow.com/questions/46734790/dynamic-selection-method-of-qdatatable-quasar-framework-vue-js

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