F
Filament5mo ago
mpiet

Why isn't it the same?

I extracted a few action into separate classes. Why does this work:
public function chooseLinkTarget(): ActionGroup
{
return ActionGroup::make([
$this->createLinkToProject(),
]);
}

protected function createLinkToProject()
{
return CreateLinkToProject::make();
}
public function chooseLinkTarget(): ActionGroup
{
return ActionGroup::make([
$this->createLinkToProject(),
]);
}

protected function createLinkToProject()
{
return CreateLinkToProject::make();
}
but not this:
public function chooseLinkTargetType(): ActionGroup
{
return ActionGroup::make([
CreateLinkToProject::make(),
]);
}
public function chooseLinkTargetType(): ActionGroup
{
return ActionGroup::make([
CreateLinkToProject::make(),
]);
}
The action modal won't open in the last example.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server