Closed awcodes closed 11 months ago
This introduced a problem:
When using a custom MediaAction that injects the form model as $record
, the record is always null|undefined
.
<?php
class MediaAction extends Action
{
public static function getDefaultName(): ?string
{
return 'filament_tiptap_media';
}
protected function setUp(): void
{
parent::setUp();
$this
->arguments([
'src' => '',
])
->action(function (
TiptapEditor|CuratorPicker $component,
Component $livewire,
array $arguments,
Model $record // <-- this used to work just fine
) {
// ...
});
}
}
I don't see what effect the Lazy attribute would have on dependency injection.
Does $livewire->getRecord()
give you the record?
Fixes console error about form data not being found when opening other modals.