F
Filament2mo ago
kazi94

Modal hidden when i open another nested modal

I have this piece of code inside my modal, which open a modal ->suffixAction( Action::make('Détails') ->modalSubmitAction(false) ->color('primary') ->icon('heroicon-o-information-circle') ->modalAlignment(Alignment::Center) ->modalWidth(MaxWidth::Small) ->modalContent( fn(Get $get, RelationManager $livewire): View => view( 'filament.pages.actions.preconisation-farm-details', [ 'farm' => Farm::with('unit') ->where('culture_id', $get('culture_id')) ->where('farmer_id', $livewire->getOwnerRecord()['id']) ->first() ], ) ) ), The expected results is when i open the nested modal it hide the first modal which reopen after i close the second modal Is there any ways to avoid this behavior? Thanks to you Sir
2 Replies
toeknee
toeknee2mo ago
By default the first modal that is open should reopen when the sub modal is closed... are you not seeing that?
Matthew
Matthew2mo ago
I dont think thats how you do nested modals Have a look at this one: https://filamentphp.com/docs/3.x/actions/modals#adding-an-extra-modal-action-button-to-the-footer nvm sorry, I see it now

Did you find this page helpful?