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