test(actions): cover native modals for actions with fields
This commit is contained in:
3 files changed
+44
No files matched your search
@@ -67,6 +67,25 @@ public function actions(NovaRequest $request): array
|
||||
`exceptInline()` leaves actions available in Nova's bulk selector and detail
|
||||
view while removing them from the row ellipsis.
|
||||
|
||||
### Actions with form fields
|
||||
|
||||
Actions that define fields use Nova's native action modal automatically. Leave
|
||||
`confirm` unset so the action's own confirmation strategy, fields, validation,
|
||||
file uploads, and dependent-field behavior are preserved.
|
||||
|
||||
```php
|
||||
RowActions::make('Actions')
|
||||
->add(
|
||||
Reject::make(),
|
||||
icon: 'x-mark',
|
||||
color: 'danger',
|
||||
);
|
||||
```
|
||||
|
||||
Do not set `confirm: false` on a field-bearing action unless it is intentionally
|
||||
safe to execute with the fields' default values. That option maps directly to
|
||||
Nova's `withoutConfirmation` behavior and bypasses the entire action modal.
|
||||
|
||||
## Button options
|
||||
|
||||
`add()` accepts the following named arguments:
|
||||
|
||||
Reference in new issue
Block a user