trait RowManipulators

Properties

array $yatable_expanded_rows
bool $yatable_expanded_rows_is_component
array $yatable_expanded_rows_content

Methods

void
removeRowFromTable(mixed $id, bool $resetSelected = true)

Remove a row from the table data (and cache).

void
addRowToTable(array $row)

Add a new row to the table data (and cache).

void
toggleExpandedRow(mixed $rowId, mixed $content, bool $is_component = false)

Toggle the expansion state of a row.

void
updateRowOnTable(mixed $id, array $newData)

Update a row's data in the table (and cache).

void
expandMobileRow(mixed $rowId)

Expand the mobile details view for a row.

void
toggleBoolean(mixed $id, string $column)

Toggle a boolean column value for a row.

Details

at line 32
void removeRowFromTable(mixed $id, bool $resetSelected = true)

Remove a row from the table data (and cache).

Parameters

mixed $id
bool $resetSelected

Whether to clear selection after removal.

Return Value

void

at line 50
void addRowToTable(array $row)

Add a new row to the table data (and cache).

Parameters

array $row

Return Value

void

at line 69
void toggleExpandedRow(mixed $rowId, mixed $content, bool $is_component = false)

Toggle the expansion state of a row.

Parameters

mixed $rowId
mixed $content

Content string or array if is_component is true.

bool $is_component

Whether the content points to a Livewire component.

Return Value

void

Exceptions

Exception

at line 95
void updateRowOnTable(mixed $id, array $newData)

Update a row's data in the table (and cache).

Parameters

mixed $id
array $newData

Key-value pairs to update.

Return Value

void

at line 113
void expandMobileRow(mixed $rowId)

Expand the mobile details view for a row.

Parameters

mixed $rowId

Return Value

void

at line 139
void toggleBoolean(mixed $id, string $column)

Toggle a boolean column value for a row.

Dispatches trigger method if defined on the column.

Parameters

mixed $id
string $column

Column key.

Return Value

void