quasar icon indicating copy to clipboard operation
quasar copied to clipboard

[Request] select all rows in Data Table

Open llin55 opened this issue 9 years ago • 7 comments

Could you please add a possibility to select all visible rows in Data Table with a checkbox in a header? Thank you in advance!

llin55 avatar May 10 '17 15:05 llin55

Will do. Thanks for filing this.

rstoenescu avatar May 10 '17 15:05 rstoenescu

+1 :)

lyquocnam avatar May 17 '17 15:05 lyquocnam

hi, i'm find a solution: this is the function for select all:

function selectAll() {
        this.$refs.dtable.clearSelection()
        this.$refs.dtable.selectedRows.push(this.$refs.dtable.rows[0])
        this.$refs.dtable.selectedRows.push(this.$refs.dtable.rows[1])
        this.$refs.dtable.rowSelection[0] = true
        this.$refs.dtable.rowSelection[1] = true
        this.$refs.dtable.toolbar = 'selection'
}

and the data-table component: <q-data-table ref="dtable" :data="table" :config="config" :columns="columns">

ygorcf avatar Sep 11 '17 20:09 ygorcf

@ygorcf we need a checkbox on header too 💃

lyquocnam avatar Sep 12 '17 00:09 lyquocnam

Closing as code is ready in future v0.15 datatable revamp.

rstoenescu avatar Oct 20 '17 18:10 rstoenescu

@rstoenescu Hi! When will v0.15 be out? Thanks!

JBrVJxsc avatar Nov 06 '17 23:11 JBrVJxsc

Is there an event for when you click the select-all checkbox from the header?

apappas1129 avatar Jun 10 '20 02:06 apappas1129