F
Filament6mo ago
Prodex

First Action Modal doesn't close

I've implemented a delete action for the editOptionForm like so:
Forms\Components\Select::make('location_id')
->label('Location')
->relationship('location', 'name')
->required()
->searchable()
->preload()
->createOptionForm([
Forms\Components\TextInput::make('name')
->required()
->maxLength(255),
])
->editOptionForm([
Forms\Components\TextInput::make('name')
->required()
->maxLength(255),
])
->editOptionAction(fn (Forms\Components\Actions\Action $action, $record) => $action
->extraModalFooterActions([
DeleteAction::make()
->record($record)
->cancelParentActions(),
]),
),
Forms\Components\Select::make('location_id')
->label('Location')
->relationship('location', 'name')
->required()
->searchable()
->preload()
->createOptionForm([
Forms\Components\TextInput::make('name')
->required()
->maxLength(255),
])
->editOptionForm([
Forms\Components\TextInput::make('name')
->required()
->maxLength(255),
])
->editOptionAction(fn (Forms\Components\Actions\Action $action, $record) => $action
->extraModalFooterActions([
DeleteAction::make()
->record($record)
->cancelParentActions(),
]),
),
But the confirmation modal for the delete action is behind the edit modal, because the edit modal doesn't close. Even when using cancelParentActions. How can I make it, so the edit modal closes? Thank you!
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server