[Solved] Remove (or hide) select all check box Table component



  • Hi all!

    I have a table in which I only want to allow the selection of 4 elements at most. I have assigned the selection property to multiple but a checkbox appears in the header that allows the selection of all rows. Is it possible to delete or hide it?

    Thanks!!



  • You can declare your <q-table> in a “more explicit” way by specifying the slot templates and omitting the select component of header or just set the hide-header property in case it isn’t indispensable.

    <q-table
            title="Example"
            :data="data"
            :columns="columns"
            row-key="name"
            selection="multiple"
            :selected.sync="selected"
          >
      
            <template v-slot:header>
               <!-- your custom header here -->
            </template>
      
    </q-table>
    


  • Hi @CristalT!

    Thank you very much for your reply! . It works ok! 🙂

    I thought there would be a more direct solution, but really, creating a slot and using it is much easier than it seems. 🤪

    Regards


Log in to reply