ModalContent() to load a livewire component directly

Hi all I am using a Modal to display a Filament table. I am having to load a view which then calls a livewire component. But it it possible to do something like this
->modalContent(fn (DocketPrices $record) => Blade::render('<livewire.dockets.supplier-orders.list-orders-wrapper :docket_price="$record" />'))
->modalContent(fn (DocketPrices $record) => Blade::render('<livewire.dockets.supplier-orders.list-orders-wrapper :docket_price="$record" />'))
and skip out the view which only exists to call the livewire component. I havnt managed to get this to work yet. Currently I need to do this:
->modalContent(fn (DocketPrices $record): View => view('livewire.dockets.supplier-orders.list-orders-wrapper', ['docket_price' => $record]))
->modalContent(fn (DocketPrices $record): View => view('livewire.dockets.supplier-orders.list-orders-wrapper', ['docket_price' => $record]))
which then calls
<livewire:dockets.supplier-orders.list-orders :docket-price="$docket_price" lazy="on-load" />
<livewire:dockets.supplier-orders.list-orders :docket-price="$docket_price" lazy="on-load" />
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server