From 5b1965b8047a3b2a8abcc9acf4df94b9bc1687e0 Mon Sep 17 00:00:00 2001 From: Steffan Halvorsen Date: Tue, 30 May 2023 12:20:24 +0200 Subject: [PATCH] Filter Actions from $panels Fix https://github.com/eminiarts/nova-tabs/issues/284 --- src/Traits/HasTabs.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Traits/HasTabs.php b/src/Traits/HasTabs.php index 3d7dab9..0de58d5 100644 --- a/src/Traits/HasTabs.php +++ b/src/Traits/HasTabs.php @@ -31,7 +31,9 @@ protected function resolvePanelsFromFields(NovaRequest $request, FieldCollection return ! isset($field->panel) || blank($field->panel); }); - $panels = $fieldsWithPanels->groupBy(function ($field) { + $panels = $fieldsWithPanels->filter(function($item) { + return gettype($item->panel) === 'string'; + })->groupBy(function ($field) { return $field->panel; })->transform(function ($fields, $name) { if ($fields[0]->assignedPanel instanceof Tabs) {