filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
18.97k stars 2.93k forks source link

Relation manager action modal content page issue #12396

Closed mgkimsal closed 6 months ago

mgkimsal commented 6 months ago

Package

filament/filament

Package Version

v3.2.40

Laravel Version

v11.4.0

Livewire Version

No response

PHP Version

8.3.3

Problem description

Trying to add a page as an action in a relation manager.

Error

Method App\Filament\Resources\GrowerResource\RelationManagers\WorkersRelationManager::getCachedSubNavigation does not exist.

comes back when clicking the action on a relation manager table headeraction

Expected behavior

Expected page to be rendered inside the action's modal. Was trying to do a livewire component, but in debugging this, narrowed down to just a plain page and still have the issue.

Steps to reproduce

php artisan migrate:fresh --seed

test@example.com / test

add a grower.

Edit the grower, and you should see a 'worker' relation manager with an 'add' button. The add is trying to render the 'demo' page created.

Reproduction repository

https://github.com/mgkimsal/filament-relman-issue

Relevant log output

No response

dmitry-udod commented 6 months ago

@mgkimsal Hi! I think this issue occurs because you are trying to render the page in a modal. If you change your demo.blade.php from

<x-filament-panels::page>

</x-filament-panels::page>

To some html

<div>Demo</div>

everything will work

https://github.com/filamentphp/filament/assets/4639175/a8dcf989-eab8-4907-b7a7-b735dc62d207

danharrin commented 6 months ago

Thanks @dmitry-udod