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