Skip to content

Commit

Permalink
fix section icon
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Mar 26, 2024
1 parent 440addb commit 118862f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Concerns/Designer.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ private static function drawSections(Form $zeusForm, ZeusSection $section, array
->description($section->description)
->aside(fn () => $section->aside)
->compact(fn () => $section->compact)
->icon($section->icon ?? null)
->collapsible();

if (optional($zeusForm->options)['show-as'] === 'tabs') {
Expand Down
9 changes: 5 additions & 4 deletions src/Fields/FieldsContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,16 @@ public function appendFilamentComponentsOptions($component, $zeusField, bool $ha
return true;
}

if (is_array($get('zeusData.' . $relatedField))) {
return in_array($relatedFieldValues, $get('zeusData.' . $relatedField));
$relatedFieldArray = Arr::wrap($get('zeusData.' . $relatedField));
if(in_array($relatedFieldValues, $relatedFieldArray)){
return true;
}

return $relatedFieldValues === $get('zeusData.' . $relatedField);
return false;
});

if ($hasVisibility) {
return $component->live(onBlur: $hasVisibility);
return $component->live();
}

return $component;
Expand Down

0 comments on commit 118862f

Please sign in to comment.