Skip to content

Commit 5a3c1dd

Browse files
authored
Merge pull request #36 from webard/fix/modal-display-filament-v3
Fix: displaying relation manager in infolist
2 parents 3a73648 + 0d71737 commit 5a3c1dd

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

resources/views/forms/relation-manager.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
$normalizedManagerClass = $normalizeRelationManagerClass($manager);
1414
15-
$managerLivewireProperties = ['lazy' => $isLazy, 'ownerRecord' => $this->getRecord(), 'pageClass' => $this::class];
15+
$managerLivewireProperties = ['lazy' => $isLazy, 'ownerRecord' => $record(), 'pageClass' => $this::class];
1616
@endphp
1717

1818

resources/views/infolists/relation-manager.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
$normalizedManagerClass = $normalizeRelationManagerClass($manager);
1414
15-
$managerLivewireProperties = ['lazy' => $isLazy, 'ownerRecord' => $this->getRecord(), 'pageClass' => $this::class];
15+
$managerLivewireProperties = ['lazy' => $isLazy, 'ownerRecord' => $record(), 'pageClass' => $this::class];
1616
@endphp
1717

1818

src/Forms/RelationManager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ public function isLazy(): bool
4141
{
4242
return (bool) $this->evaluate($this->isLazy);
4343
}
44+
45+
public function record(): ?Model
46+
{
47+
return $this->getRecord();
48+
}
4449
}

src/Infolists/RelationManager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,9 @@ public function isLazy(): bool
4141
{
4242
return (bool) $this->evaluate($this->isLazy);
4343
}
44+
45+
public function record(): ?Model
46+
{
47+
return $this->getRecord();
48+
}
4449
}

0 commit comments

Comments
 (0)