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
Did you use the command to generate the page? The view should be extending the appropriate blade view.
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?
Hmm. Possibly.
It shouldn’t though.
Can you give me screenshot of the page.?
You can see that the content is the filament page but everything else is the default Laravel template.
Why is the page loading in jetstream’s view.? What is in your custom pages blade file?
It is just the default.
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.
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?
What are you trying to tweak?
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.
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.
Actually it does not collect the new data from the DB. Looking at the code overriding the getViewData function should do the trick.
Would still work even if it had to hit the db.
Great. Thank you so much for your help!