F
Filamentβ€’14mo ago
Mark Chaney

Nested Modal Action

So I have a modal that is using modalContent() and then loading a livewire component within it. Everything is working amazing, even a nested table with its on header action that opens a model.
->slideOver()
->modalContent(function ($record): View {
return view(
'forms.property',
['record' => $this->setPropertyRecord($record)],
);
});
->slideOver()
->modalContent(function ($record): View {
return view(
'forms.property',
['record' => $this->setPropertyRecord($record)],
);
});
and then in that View, I have
<div>
<livewire:view-property :property-id="$record->id"/>
</div>
<div>
<livewire:view-property :property-id="$record->id"/>
</div>
My only problem is that wihtin that view-property component, I cant launch a modal with a standalone action. Every other action is running fine and I can see this action actually running according to ray() output, I just never see the modal. Its not as simple as adding
<x-filament-actions::modals/>
<x-filament-actions::modals/>
within that forms.property and its already in view-property. I have a different page with the view-property where its loaded standalone and of course the modal launches there. Unfortunately its also not as simple as doing a registerModalActions() on the original Action that launches modalContent() as that only makes the action available within forms.property and I cant simply pass it all the way to the final livewire component of view-property. Id rather not go that route anyway as it makes things less flexible for me. But right now I just need to get it working. I know this is a lot to digest, but any suggestions are appreciated.
1 Reply
Mark Chaney
Mark ChaneyOPβ€’14mo ago
any suggestions? πŸ˜‰ I can add more context if needed.
Want results from more Discord servers?
Add your server