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

    qTable with select all and pagination

    Help
    2
    3
    806
    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.
    • H
      hpawar last edited by

      Hello,

      I am using qtable with pagination and select all options. On selecting select all icon, only the items on the current page get selected. Can someone please let me know if select all can be made to select all rows across all pages of the qtable?

      Thanks
      HP

      1 Reply Last reply Reply Quote 1
      • C
        chyde90 last edited by

        With “select all icon” you mean the checkbox in the table head that appears when you set selection="multiple" on the QTable, right?
        I don’t know how to modify that, but you could use an external button and set the selected property to your whole table data array.

        <q-table
            :data="tableData"
            selection="multiple"
            :selected.sync="selected"
            ....
        </q-table>
        
        <q-btn label="click me" @click="buttonClicked" />
        
        {
            buttonClicked() {
                this.selected = this.tableData;
            }
        }
        
        H 1 Reply Last reply Reply Quote 1
        • H
          hpawar @chyde90 last edited by

          @chyde90 Yes I meant checkbox in the table header itself. Yeah, I did think about the second approach you mentioned. But was wondering if there was a way of doing it without having to write my own code.

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