Logo Beartropy Tables

Beartropy Tables

Bulk Actions
Manage row selection and bulk operations.

Enable Bulk Selection

hasBulk(bool $bool)
Enables the checkbox column for row selection.

1$this->hasBulk(true);

Get Selected Rows

getSelectedRows()
Returns an array of IDs of the currently selected rows.

1// In your component logic
2$selectedIds = $this->getSelectedRows();

Get Selected Data

Retrieve the full data objects for selected rows.

getSelectedOriginalData()
Returns only the user-selected rows with raw values.

getSelectedData()
Returns only the user-selected rows with formatting applied.

1// Returns raw values
2$rawData = $this->getSelectedOriginalData();
3 
4// Returns formatted values
5$formattedData = $this->getSelectedData();

Clear Selection

emptySelection()
Deselects all currently selected rows.

1$this->emptySelection();