Skip to content

Commit

Permalink
Merge pull request #197 from mallardduck/fix-filament-evaluates
Browse files Browse the repository at this point in the history
fix: evaluate potential closure value before rendering component
  • Loading branch information
atmonshi authored Mar 7, 2024
2 parents 6efe702 + 6ad532e commit 90fa533
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ protected function getActions(): array
Group::make()
->statePath('data')
->whenTruthy('type')
->schema(function (Get $get) {
->schema(function (Get $get, Component $component) {
$type = $get('type');

return SkyPlugin::get()->getItemTypes()[$type]['fields'] ?? [];
return $component->evaluate(SkyPlugin::get()->getItemTypes()[$type]['fields']) ?? [];
}),
Group::make()
->statePath('data')
Expand Down

0 comments on commit 90fa533

Please sign in to comment.