F
Filament6mo ago
SK

Navigation missing on custom page

Hello everyone! I have the following issue and cannot find a solution for it in the docs or code. I created a custom page on a new Filament ressource. On all default pages the navigation is visible. Now my issue: On the custom page only the breadcrumbs are visible but not the navigation. Does anyone have an idea what I am missing here?
14 Replies
awcodes
awcodes6mo ago
Did you use the command to generate the page? The view should be extending the appropriate blade view.
SK
SK6mo ago
Yes I used „php artisan make:filament-page <pagename>“ but added it to a resource that did not exist before. Might that be the issue?
awcodes
awcodes6mo ago
Hmm. Possibly. It shouldn’t though. Can you give me screenshot of the page.?
SK
SK6mo ago
You can see that the content is the filament page but everything else is the default Laravel template.
No description
awcodes
awcodes6mo ago
Why is the page loading in jetstream’s view.? What is in your custom pages blade file?
SK
SK6mo ago
It is just the default.
No description
awcodes
awcodes6mo ago
Something is off though. It’s getting loaded in a jetstream view which is probably breaking everything at the html level. The filament page is a complete html doc so it shouldn’t be trying to render in a jetstream view. You might have a conflict with full page live components. Or your custom pages route isn’t going through filament for some reason.
SK
SK6mo ago
I see the issue, I had my own render method declared in my custom page to avoid dehydration. When I set my logic back to the mount method it works. Do you know a way to tweak the filament render function for custom pages?
awcodes
awcodes6mo ago
What are you trying to tweak?
SK
SK6mo ago
The data on my component should be updated with wire:poll. If I only load data in the mount function, the data is not updated until I refresh the page. Therefore I need to pass the data in the render function.
awcodes
awcodes6mo ago
Wire poll should update and re-render the component though. It shouldn’t be needed in the render method. So, a public method to manipulate the data that you can call in mount and on wire poll. The data needs to be a public property on the lw component though.
SK
SK6mo ago
Actually it does not collect the new data from the DB. Looking at the code overriding the getViewData function should do the trick.
awcodes
awcodes6mo ago
Would still work even if it had to hit the db.
SK
SK6mo ago
Great. Thank you so much for your help!