Skip to content

Commit 90fa533

Browse files
authored
Merge pull request #197 from mallardduck/fix-filament-evaluates
fix: evaluate potential closure value before rendering component
2 parents 6efe702 + 6ad532e commit 90fa533

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Filament/Resources/NavigationResource/Pages/Concerns/HandlesNavigationBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ protected function getActions(): array
112112
Group::make()
113113
->statePath('data')
114114
->whenTruthy('type')
115-
->schema(function (Get $get) {
115+
->schema(function (Get $get, Component $component) {
116116
$type = $get('type');
117117

118-
return SkyPlugin::get()->getItemTypes()[$type]['fields'] ?? [];
118+
return $component->evaluate(SkyPlugin::get()->getItemTypes()[$type]['fields']) ?? [];
119119
}),
120120
Group::make()
121121
->statePath('data')

0 commit comments

Comments
 (0)