Skip to content

Commit b29944b

Browse files
committed
align to v1 to hide tab when no other relation managers
1 parent 3a40dff commit b29944b

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/Filament/Resources/ContentResource/Pages/EditContentRecord.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public static function getResource(): string
1616

1717
public function hasCombinedRelationManagerTabsWithContent(): bool
1818
{
19+
if (empty($this->getRelationManagers())) {
20+
return false;
21+
}
22+
1923
return true;
2024
}
2125

src/Filament/Resources/ContentResource/Pages/ViewContentRecord.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public function getParentKey(): string | int | null
3333

3434
public function hasCombinedRelationManagerTabsWithContent(): bool
3535
{
36+
if (empty($this->getRelationManagers())) {
37+
return false;
38+
}
39+
3640
return true;
3741
}
3842

src/Filament/Resources/Roles/Schemas/RoleForm.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public static function configure(Schema $schema): Schema
2424
return $schema
2525
->components([
2626
Section::make()
27+
->columnSpanFull()->columns(1)
2728
->schema([
2829
RoleNameInput::make(),
2930
Hidden::make('guard_name')

0 commit comments

Comments
 (0)