From 6ad532e730067a5956522d8e0dc0f72a8a988d2f Mon Sep 17 00:00:00 2001 From: Dan Pock Date: Wed, 6 Mar 2024 10:27:37 -0500 Subject: [PATCH] fix: evaluate potential closure value before rendering component --- .../Pages/Concerns/HandlesNavigationBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Filament/Resources/NavigationResource/Pages/Concerns/HandlesNavigationBuilder.php b/src/Filament/Resources/NavigationResource/Pages/Concerns/HandlesNavigationBuilder.php index 8870c35..3c4ba4d 100644 --- a/src/Filament/Resources/NavigationResource/Pages/Concerns/HandlesNavigationBuilder.php +++ b/src/Filament/Resources/NavigationResource/Pages/Concerns/HandlesNavigationBuilder.php @@ -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')