Skip to content

Commit

Permalink
Merge pull request #3 from Saifallak/patch-2
Browse files Browse the repository at this point in the history
fixes #1
  • Loading branch information
pxlrbt authored Jun 19, 2023
2 parents e5aeb4f + d1ac92c commit 886529d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/Pages/ListActivities.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace pxlrbt\FilamentActivityLog\Pages;

use Filament\Forms\Components\Builder;
use Filament\Forms\Components\Field;
use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\MorphToSelect;
use Filament\Resources\Form;
use Filament\Resources\Pages\Concerns\HasRecordBreadcrumb;
use Filament\Resources\Pages\Concerns\InteractsWithRecord;
Expand Down Expand Up @@ -54,17 +53,13 @@ protected function createFieldLabelMap(): Collection
$extracted = collect();

while (($component = $components->shift()) !== null) {
$children = $component->getChildComponents();

if (
$component instanceof Repeater
|| $component instanceof Builder
) {
if ($component instanceof Field || $component instanceof MorphToSelect) {
$extracted->push($component);

continue;
}

$children = $component->getChildComponents();

if (count($children) > 0) {
$components = $components->merge($children);

Expand Down

0 comments on commit 886529d

Please sign in to comment.