Filament v4 action modal, inside action modal

Hello, I'm having an issue displaying an action modal inside an action modal, for some reason the child modal seems to be getting height from parent modal so on my relation manager i have a custom column set like:
TextColumn::make('name_edit')
->visibleFrom('md')
->badge()
->color('success')
->html()
->getStateUsing(fn($record) => view('filament.partials.tests-badge', [
'count' => $record?->tests->count(),
])->render())
->icon(fn(bool $state): string => 'heroicon-m-eye')
->label('Teste probă')
->action(
Action::make('viewSampleTests')
->label('Tests')
->modalSubmitAction(false)
->modalWidth(Width::SevenExtraLarge)
->modalContent(
fn($record) => view('livewire.sample-tests', [
'record' => $record
])
),
),
TextColumn::make('name_edit')
->visibleFrom('md')
->badge()
->color('success')
->html()
->getStateUsing(fn($record) => view('filament.partials.tests-badge', [
'count' => $record?->tests->count(),
])->render())
->icon(fn(bool $state): string => 'heroicon-m-eye')
->label('Teste probă')
->action(
Action::make('viewSampleTests')
->label('Tests')
->modalSubmitAction(false)
->modalWidth(Width::SevenExtraLarge)
->modalContent(
fn($record) => view('livewire.sample-tests', [
'record' => $record
])
),
),
inside that modal i'm displaying the tests() relation table for sample, and if i try to click Edit on that table, the opened modal doesn't close parent modal and it's inheriting the height of parent modal Is this a known bug in v4?
6 Replies
Kikechi
Kikechi3w ago
@jamesro I have the same issue. Changing to slide over helps a little bit, and not all cases make sense to use a slide over.
jamesro
jamesroOP3w ago
@Kikechi do you mind providing some more details? not sure I understand your solution
Kikechi
Kikechi3w ago
Action::make('viewSampleTests') ->label('Tests') ->modalSubmitAction(false) ->slideOver() // this changes modal into slide-over ->modalWidth(Width::SevenExtraLarge) ->modalContent( fn ($record) => view('livewire.sample-tests', [ 'record' => $record, ]) ),
jamesro
jamesroOP3w ago
thanks, ya better now, but I think you agree with me modal in modal should work and dont have that height issue, i think in V3 it worked just fine
Kikechi
Kikechi3w ago
@jamesro you are absolutely right.
jamesro
jamesroOP3w ago
thanks, i'll see if I find time to create the code need to report on filament v4 github or let me know if you can report it and I cand second you on the opened ticket

Did you find this page helpful?