F
Filamentβ€’8mo ago
EMMAN

IT IS POSSIBLE TO ADD "EDIT BUTTON" on VIEW MODAL?

IT IS POSSIBLE TO ADD "EDIT BUTTON" on VIEW MODAL? So edit modal will be open. TY
No description
9 Replies
Dennis Koch
Dennis Kochβ€’8mo ago
Can you please stop shouting? πŸ™ˆ
dissto
disstoβ€’8mo ago
I guess you could do something like that:
ViewAction::make()
->modalFooterActions(function (\Filament\Tables\Actions\Action $action) {
return [
$action->getModalCancelAction(),
EditAction::make(),
];
}),
ViewAction::make()
->modalFooterActions(function (\Filament\Tables\Actions\Action $action) {
return [
$action->getModalCancelAction(),
EditAction::make(),
];
}),
But you need to stop screaming πŸ˜‚
EMMAN
EMMANOPβ€’8mo ago
sorry guys about screaming πŸ˜†
EMMAN
EMMANOPβ€’8mo ago
its working, but its empty on Edit Modal
LeandroFerreira
LeandroFerreiraβ€’8mo ago
Did import EditAction from Table? Tables\Actions\EditAction::make() ?
EMMAN
EMMANOPβ€’8mo ago
yes sir, already imported
LeandroFerreira
LeandroFerreiraβ€’8mo ago
I think this should work.. try this
Tables\Actions\ViewAction::make()
->extraModalFooterActions([
Tables\Actions\EditAction::make()
->after(function (Tables\Actions\EditAction $action) {
$action->cancelParentActions();
})
])
Tables\Actions\ViewAction::make()
->extraModalFooterActions([
Tables\Actions\EditAction::make()
->after(function (Tables\Actions\EditAction $action) {
$action->cancelParentActions();
})
])
EMMAN
EMMANOPβ€’8mo ago
alright, that code is working! i suggest that, someone must add it on the documentation
dissto
disstoβ€’8mo ago
Well the docs are open source as well, you could do it yourself 😊

Did you find this page helpful?