F
Filament2mo ago
Luca

Is it possible to give a custom Param to the Delete Modal?

Hey guys, i wanted to give a custom Param to the delete Modal, so it does not show my ID. Is that possible? I'm using V 3.3.34 Already tried:
Tables\Actions\DeleteAction::make()
->after(function (Component $livewire) {
$livewire->dispatch('refreshAccounts', ['email' => $this->record->email]);
}),
Tables\Actions\DeleteAction::make()
->after(function (Component $livewire) {
$livewire->dispatch('refreshAccounts', ['email' => $this->record->email]);
}),
No description
7 Replies
LeandroFerreira
LeandroFerreira2mo ago
?
->after(function (YourModel $record) {
// $record->..
})
->after(function (YourModel $record) {
// $record->..
})
Luca
LucaOP2mo ago
What you mean?
LeandroFerreira
LeandroFerreira2mo ago
is the param from your Model?
Luca
LucaOP2mo ago
I'm in a RelationManager
LeandroFerreira
LeandroFerreira2mo ago
and what you are trying to do? Explain it please
LeandroFerreira
LeandroFerreira2mo ago
if you want to use the owner record, use this
Luca
LucaOP2mo ago
Okay, the Section where im in is Account and AccountResource. There i created a RelationGroup Entry to my RelationManager. In my RelationManager I've got a Table/List, there I want to delete one entry and show the email which gets deleted (Param Name is also email), but he uses another Param to display. Solved it just by thinking again about it. Thank you @Leandro Ferreira Fix was :
->recordTitleAttribute('email')
->recordTitleAttribute('email')

Did you find this page helpful?