From d1928526cc64d9321288019b5f5fca9e4c863ef0 Mon Sep 17 00:00:00 2001 From: Bezhan Salleh Date: Sun, 17 Sep 2023 00:24:17 +0430 Subject: [PATCH] added collapsible to sections --- src/Resources/RoleResource.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Resources/RoleResource.php b/src/Resources/RoleResource.php index 683bfd4..8b0e16f 100644 --- a/src/Resources/RoleResource.php +++ b/src/Resources/RoleResource.php @@ -79,8 +79,8 @@ public static function form(Form $form): Form Forms\Components\Grid::make() ->schema(static::getResourceEntitiesSchema()) ->columns([ - 'sm' => 2, - 'lg' => 3, + 'sm' => 1, + 'lg' => 1, ]), ]), Forms\Components\Tabs\Tab::make(__('filament-shield::filament-shield.pages')) @@ -331,9 +331,8 @@ public static function getResourceEntitiesSchema(): ?array return collect(FilamentShield::getResources())->sortKeys()->reduce(function ($entities, $entity) { $entities[] = Forms\Components\Section::make(FilamentShield::getLocalizedResourceLabel($entity['fqcn'])) - ->description(Utils::showModelPath($entity['fqcn'])) + ->description(fn () => new HtmlString(''.Utils::showModelPath($entity['fqcn']).'')) ->compact() - ->extraAttributes(['class' => 'border-0 shadow-lg']) ->schema([ Forms\Components\CheckboxList::make($entity['resource']) ->label('') @@ -367,11 +366,13 @@ public static function getResourceEntitiesSchema(): ?array ->bulkToggleable() ->gridDirection('row') ->columns([ - 'default' => 1, - 'sm' => 2, + 'default' => 2, + 'sm' => 3, + 'lg' => 4 ]), ]) - ->columnSpan(1); + ->columnSpanFull() + ->collapsible(); return $entities; }, collect())