Use checkbox for column selection Issue

Hello
I have enabled 'Use checkbox for column selection'

I would like to use this check box. At the top of the column to select all the rows checkboxes.
Is that possible to do?

There is a 'Select All' and a 'Select All on Page' but these don't work.

Thank you
Jamie
Screenshot 2023-01-27 at 17.21.15

Hey @Jamie_Good!

Unfortunately, that checkbox isn't currently supported for server-side paginated tables. By entering a value into the "Total row count" field of your table you can select all of the options on the current page and NaN will be replaced with the value you enter. However, the "Select all" functionality still won't work properly.

Would you mind describing more about your use case? I imagine it's possible to build out a custom select all functionality using the table's selectRow method (docs) along with the appropriate event handlers. However, how that would work exactly depends on how you want to interact with the fact your table is server-side paginated.

Otherwise, you can try using the following custom css to hide the top "Select all" option:

._g5Sf- > div > div:first-child{
  display: none;
}

Or use the following to hide the menu containing both options entirely:

._7dFRO{
  display: none;
}
1 Like

Thanks for that. Very helpful.

I would like a button / option to add a tick to all the checkboxes for each row in the table.

Next I'd like to have a button for example 'Delete all selected'
That button run a query to delete all the selected

The ability to select all the rows(checkboxes) with one button will allow me to more easily which rows I want to delete. Select all, untick a couple I want to keep and boom! Basically.

Hope that makes sense.

BTW I add {{table1.data.length}} to the 'Total Row Count' of the table component and NOW when I click on the top checkbox all the rows are selected. Which is exactly what I need so thanks for that.

Now I just need to figure out how to get all the selected rows and use those in a query.
All ideas how to get all selected rowsI.E. all the ticked ones?

many thanks for the help.

Jamie

Yep! That totally makes sense. You should be able to access the rows you've selected in the table's selectedRow property:

You might also want to include a custom button that clears your selection:

1 Like

OK great I'm making progress. Thank you.

I have the mutli select on the rows now and a single button at the bottom that will deal with all the selected rows.

So one last thing if this is possible. I also want to have a button in each row. I added that button.

But the issue is that I can't seem to identify the table row that button is in.

When I use a multi select table then this myTable.selectedRow.data becomes an array.
So my row button doesn't know which rows it's in.

If I don't use a multitable select the myTable.selectedRow is an object with the rows data.

IS there any way, with a multi select table to use a row button that can know it's row?

Many thanks again
Jamie

You might try referencing currentRow! You can do so either by using {{}} in the settings for the button column itself, or in any query that is triggered by the button: