diff --git a/packages/tables/docs/04-actions.md b/packages/tables/docs/04-actions.md index ac3fdebd77..78781cf16d 100644 --- a/packages/tables/docs/04-actions.md +++ b/packages/tables/docs/04-actions.md @@ -5,7 +5,7 @@ import AutoScreenshot from "@components/AutoScreenshot.astro" ## Introduction -Filament's tables can use [Actions](../actions). They are buttons that can be added to the [end of any table row](#record-actions), or even in the [header](#header-actions) of a table. For instance, you may want an action to "create" a new record in the header, and then "edit" and "delete" actions on each row. [Bulk actions](#bulk-actions) can be used to execute code when records in the table are selected. Additionally, actions can be added to any [table column](#column-actions), such that each cell in that column is a trigger for your action. +Filament's tables can use [Actions](../actions). They are buttons that can be added to the [end of any table row](#record-actions), or even in the [header](#header-actions) or [toolbar](#toolbar-actions) of a table. For instance, you may want an action to "create" a new record in the header, and then "edit" and "delete" actions on each row. [Bulk actions](#bulk-actions) can be used to execute code when records in the table are selected. Additionally, actions can be added to any [table column](#column-actions), such that each cell in that column is a trigger for your action. It's highly advised that you read the documentation about [customizing action trigger buttons](../actions/overview) and [action modals](../actions/modals) to that you are aware of the full capabilities of actions. @@ -116,7 +116,7 @@ public function table(Table $table): Table ## Bulk actions -Tables also support "bulk actions". These can be used when the user selects rows in the table. Traditionally, when rows are selected, a "bulk actions" button appears in the top left corner of the table. When the user clicks this button, they are presented with a dropdown menu of actions to choose from. You can put them in the `$table->toolbarActions()` or `$table->headerActions()` methods: +Tables also support "bulk actions". These can be used when the user selects rows in the table. Traditionally, when rows are selected, a "bulk actions" button appears. When the user clicks this button, they are presented with a dropdown menu of actions to choose from. You can put them in the `$table->toolbarActions()` or `$table->headerActions()` methods: ```php use Filament\Tables\Table; diff --git a/packages/tables/resources/views/index.blade.php b/packages/tables/resources/views/index.blade.php index 1f0a72528c..52e0e185c0 100644 --- a/packages/tables/resources/views/index.blade.php +++ b/packages/tables/resources/views/index.blade.php @@ -12,14 +12,14 @@ use Illuminate\Support\Str; use Illuminate\View\ComponentAttributeBag; - $actions = $getActions(); - $flatActionsCount = count($getFlatActions()); - $actionsAlignment = $getActionsAlignment(); - $actionsPosition = $getActionsPosition(); - $actionsColumnLabel = $getActionsColumnLabel(); + $recordActions = $getRecordActions(); + $flatRecordActionsCount = count($getFlatRecordActions()); + $recordActionsAlignment = $getRecordActionsAlignment(); + $recordActionsPosition = $getRecordActionsPosition(); + $recordActionsColumnLabel = $getRecordActionsColumnLabel(); - if (! $actionsAlignment instanceof Alignment) { - $actionsAlignment = filled($actionsAlignment) ? (Alignment::tryFrom($actionsAlignment) ?? $actionsAlignment) : null; + if (! $recordActionsAlignment instanceof Alignment) { + $recordActionsAlignment = filled($recordActionsAlignment) ? (Alignment::tryFrom($recordActionsAlignment) ?? $recordActionsAlignment) : null; } $activeFiltersCount = $getActiveFiltersCount(); @@ -89,7 +89,7 @@ $defaultSortOptionLabel = $getDefaultSortOptionLabel(); $sortDirection = $getSortDirection(); - if (count($actions) && (! $isReordering)) { + if (count($recordActions) && (! $isReordering)) { $columnsCount++; } @@ -791,7 +791,7 @@ $hasCollapsibleColumnsLayout = (bool) $collapsibleColumnsLayout?->isVisible(); $recordActions = array_reduce( - $actions, + $recordActions, function (array $carry, $action) use ($record): array { if (! $action instanceof \Filament\Actions\ActionGroup) { $action = clone $action; @@ -985,7 +985,7 @@ @elseif ($recordAction) @php - $recordWireClickAction = $getAction($recordAction) + $recordWireClickAction = $getRecordAction($recordAction) ? "mountTableAction('{$recordAction}', '{$recordKey}')" : $recordWireClickAction = "{$recordAction}('{$recordKey}')"; @endphp @@ -1040,7 +1040,7 @@ 'fi-ta-actions fi-wrapped sm:fi-not-wrapped', 'fi-align-start' => $contentGrid, 'md:fi-align-end' => ! $contentGrid, - 'fi-ta-actions-before-columns-position' => $actionsPosition === RecordActionsPosition::BeforeColumns, + 'fi-ta-actions-before-columns-position' => $recordActionsPosition === RecordActionsPosition::BeforeColumns, ]) > @foreach ($recordActions as $action) @@ -1120,7 +1120,7 @@ @if ($isReordering)