trait Bulk

Properties

bool $has_bulk

Indicates if the table has bulk actions enabled.

(int|string)[] $yat_selected_checkbox

Array of selected row IDs for bulk actions.

bool $selectAll

Controls the "Select All" checkbox state.

bool $pageSelected

Indicates if the current page is selected.

bool $allSelected

Indicates if all data (across all pages) is selected.

Methods

void
emptySelection()

Clear the current selection.

void
hasBulk(bool $bool)

Enable or disable bulk actions.

void
updatedSelectAll(bool $value)

Handle updates to the "Select All" checkbox.

void
selectCurrentPage(bool $value)

Select all rows on the current page.

void
select_all_data(bool $value)

Select all rows across all pages (after filters).

(int|string)[]
getSelectedRows()

Get the list of selected row IDs.

Details

at line 49
void emptySelection()

Clear the current selection.

Resets the selected checkboxes and the "select all" state.

Return Value

void

at line 61
void hasBulk(bool $bool)

Enable or disable bulk actions.

Parameters

bool $bool

Return Value

void

at line 74
void updatedSelectAll(bool $value)

Handle updates to the "Select All" checkbox.

This method is triggered by Livewire when $selectAll property changes.

Parameters

bool $value

The new value of the checkbox.

Return Value

void

at line 86
void selectCurrentPage(bool $value)

Select all rows on the current page.

Parameters

bool $value

If true, selects all rows on the current page. If false, deselects them.

Return Value

void

at line 101
void select_all_data(bool $value)

Select all rows across all pages (after filters).

Parameters

bool $value

If true, selects all matching rows. If false, clears selection.

Return Value

void

at line 126
(int|string)[] getSelectedRows()

Get the list of selected row IDs.

Return Value

(int|string)[]