F
Filamentβ€’7mo 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β€’7mo ago
Can you please stop shouting? πŸ™ˆ
dissto
disstoβ€’7mo 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β€’7mo ago
sorry guys about screaming πŸ˜†
EMMAN
EMMANOPβ€’7mo ago
its working, but its empty on Edit Modal
LeandroFerreira
LeandroFerreiraβ€’7mo ago
Did import EditAction from Table? Tables\Actions\EditAction::make() ?
EMMAN
EMMANOPβ€’7mo ago
yes sir, already imported
LeandroFerreira
LeandroFerreiraβ€’7mo 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β€’7mo ago
alright, that code is working! i suggest that, someone must add it on the documentation
dissto
disstoβ€’7mo ago
Well the docs are open source as well, you could do it yourself 😊
Want results from more Discord servers?
Add your server