how to disable footer actions on a Modal?

I tried to disable the actions but when I click refresh while the modal is open it displayed like shown on the image this is the Action code to trigger the Modal
Tables\Actions\Action::make('View pdf')
->disabledForm()
->modalContent(fn ($record) => view('app.custom-modal', ['record' => $record]))
->modalSubmitAction(fn ($action) => $action->disabled(fn (): bool => true)->hidden())
->modalCancelAction(fn ($action) => $action->disabled(fn (): bool => true)->hidden()),
Tables\Actions\Action::make('View pdf')
->disabledForm()
->modalContent(fn ($record) => view('app.custom-modal', ['record' => $record]))
->modalSubmitAction(fn ($action) => $action->disabled(fn (): bool => true)->hidden())
->modalCancelAction(fn ($action) => $action->disabled(fn (): bool => true)->hidden()),
and yes i enabled the ->unsavedChangesAlerts() in the provider.
No description
5 Replies
Rolland
RollandOP6mo ago
I want this modal to act as a viewer instead of form.
toeknee
toeknee6mo ago
Change Action to ViewAction?
Rolland
RollandOP6mo ago
it is still giving that popup
LeandroFerreira
LeandroFerreira6mo ago
modalSubmitAction(false)->modalCancelAction(false) ?
toeknee
toeknee6mo ago
Sounds like it's because it's mounting it's creating a bit of a issue, If you want a true view, just build a custom view? You could create a PR which check if view and therefore skips the navigate away warning. like data-attr-nav-warning="false"
Want results from more Discord servers?
Add your server