Skip to content

Commit

Permalink
Filter Actions from $panels
Browse files Browse the repository at this point in the history
Fix #284
  • Loading branch information
steffanhalv authored May 30, 2023
1 parent c9091cf commit 5b1965b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Traits/HasTabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5b1965b

Please sign in to comment.