Selection column in table as last column
-
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.
-
@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.
-
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
asq-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>
-
@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.