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

    Selection column in table as last column

    Help
    2
    4
    369
    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
      twistedcat last edited by

      I’m trying to have my multiple selection column in my table as the last column of my table. Is there a simple way to do that without rewritting the whole body + headers of the table ?

      Did not find any option for that in the doc, and the only solution I see is to use the “body” slot, which would force me to rewrite all the other cells also.

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

        @twistedcat not ootb, tho cells can easily be created using a v-for, or you can use body-cell and do your condition there. There’s also after slot.

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

          hi @metalsadman , I don’t see any “after” slot in the Table API ? As for the use of body-cell I’m not sure I would use it to moce the selection column from first to last ?

          My current table looks like this: (treat all the ms-table as q-table in the tags)

              <ms-table
                :data="sources"
                :columns="columns"
                row-key="id"
                @row-click="onRowClicked"
                :pagination.sync="pagination"
                :loading="loading"
                @request="onTableRequest"
                binary-state-sort
                :visible-columns="visibleColumns"
                :selected.sync="selectedSources"
                selection="multiple"
              >
                <template v-slot:body-cell-isImmo="props">
                  <ms-table-bool :props="props" />
                </template>
                <template v-slot:body-cell-isEnabled="props">
                  <ms-table-bool circle-style size="sm" :props="props" />
                </template>
                <q-td slot="body-cell-actions" slot-scope="props" :props="props">
                  <ms-table-btn icon="fas fa-trash-alt" class="q-mr-md" />
                </q-td>
              </ms-table>
          
          metalsadman 1 Reply Last reply Reply Quote 0
          • metalsadman
            metalsadman @twistedcat last edited by metalsadman

            @twistedcat sorry misread I thought you were talking bout rows (after slot is for adding extra row). I see that you want something to be reversed.

            there’s no out of the box qtable feature for what you are trying to do, so yeah, you’ll have to roll on your own using the available slots.

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