It seems to default to 5, and I don’t know how to change it, to 10 for instance
saying :rows-per-page-options="[10]" makes no difference
It seems to default to 5, and I don’t know how to change it, to 10 for instance
saying :rows-per-page-options="[10]" makes no difference
Aha, found out one way
<q-field borderless>
<q-btn label=“RECENT” icon=“refresh” color=“primary”></q-btn>
</q-field>
BTW, row slot seems to work ok, but if anyone knows a simpler way, do tell
<template class=“row” #body=“props”>
<q-tr :props=“props” @@click.native=“requestRowClick(props.row.id)” class=“cursor-pointer”>
<q-td v-for=“col in props.cols” :key=“col.name” :props=“props”>
{{ col.value }}
</q-td>
</q-tr>
</template>
Also, if I were to use selection=“single”, any way to make it select on row click, i.e. not demand click on checkbox ?
Say I setup a rowsPerPage to 5, but I only have 2 rows, the table will be shorter than when there is 5 rows. Any way to get the table to render to the same height no matter how many rows we have, i.e. creating blank rows to fill the remaining space?
I ask as I don’t want the UI below the table to jump around as I page the table. If I were to have 7 rows, as I page onto the 2nd page with 2 rows, the table gets shorter and everything below it jumps up
Ok, found a quick way, although I still wonder if there is a simpler way
var row=myvue.requestdata.find(row => row.id === key);
myvue.requestselected=[row];
I note that q-table :selected.sync is an array of selected rows. Is there a simple way to select 1 or more rows simply based on row-key?
e.g. selectedrows=[1,2,3]
Thanks
If I have a split, I have a button and a dropdown.
I’d like to disable the button, but leave the dropdown enabled.
i.e. it wouldn’t be valid to press the button, but it is valid to click the drop down
I have a q-option-group inside it, works nicely, but would like to be able to disable the q-btn-dropdown without disabling the dropdown part
Any idea how?
Also, if I were to use selection=“single”, any way to make it select on row click, i.e. not demand click on checkbox ?
Trouble with above solution is that it ignores my existing #body-cell-[name] slots
Any way to “derive” q-tds instead of simply iterating on props.cols?
BTW, row slot seems to work ok, but if anyone knows a simpler way, do tell
<template class=“row” #body=“props”>
<q-tr :props=“props” @@click.native=“requestRowClick(props.row.id)” class=“cursor-pointer”>
<q-td v-for=“col in props.cols” :key=“col.name” :props=“props”>
{{ col.value }}
</q-td>
</q-tr>
</template>
I don’t want selection per se, just to know when user clicks on a row
How would I do that? I want to update a detail table based on an id in the row
I assume I could create a template for #body slot and put my logic there, but was wondering if there was a simple “onRowClick” lurking somewhere
Thanks