Column-level filtering above each shown column in Quasar table
-
- sorry, I made an alias and will be moving most of the code at
src/features
, about the specific code it’s at line 31 ofsrc/features/TableExtension/ui/CustomHeader.vue
file. - not sure what you mean, but you’ll have to leverage off the slots and methods of QTable’s API to achieve what you want.
- sorry, I made an alias and will be moving most of the code at
-
-
as you can see in my code, I have q-tds (https://github.com/nwfsc-fram/boatnet/blob/master/apps/obs-web/src/views/DebrieferTrips.vue#L85) and yours has a loop with
<div class="column">
. How do I leverage q-tds with your feature? -
Also in my template I have
v-slot:body="props"
(https://github.com/nwfsc-fram/boatnet/blob/master/apps/obs-web/src/views/DebrieferTrips.vue#L73) not header, if I change it to header, then all rows in my code become the header.
-
-
v-slot:headers
is for headers orthead
which usesq-tr
andq-th
, in my example i was just overriding the header part.v-slot:body
is for the body which usesq-tr
andq-td
or the table’stbody
.
check the QTable’s api card ->Scoped Slots to understand these slots. https://quasar.dev/vue-components/table#QTable-API
-
@metalsadman from the Scoped Slot documentation it says
body: “Suggestion: QTr + QTh”
header: “Suggestion: QTr + QTh”so can I use scope header and body at the same time? Use headers the way you developed it and skip the column piece?
-
@Mak-NOAA just checked body slot qtr + qtd, yes you can use both since it pertains to different parts of the table. The column you are mentioning doesnt point to the table, its a class from https://quasar.dev/layout/grid/introduction-to-flexbox#Setting-Direction. Not table related.
-
@metalsadman do you suggest using both body and header slot?
-
@metalsadman tried that and added a comment for you in github (https://github.com/nwfsc-fram/boatnet/pull/697/files)
-
@metalsadman following up, any thoughts?
-
@metalsadman any thoughts on https://github.com/nwfsc-fram/boatnet/pull/697/files?
-
Hi guys, thanks for starting this thread, it is very relevant for us. I want to contribute this package I found that may solve this issue:
https://github.com/pratik227/quasar-qgrid
They also provide examples which illustrate the function pretty well