F
Filament4mo ago
Hugo

Dashboard navitem when active hides hooks by default?

Hello, I developed a search feature for nav items on the sidebar using the hook.
->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() => view('tables.sidebar-search'))
->renderHook(PanelsRenderHook::SIDEBAR_NAV_START, fn() => view('tables.sidebar-search'))
Everything is doing good and I able to filter through all the nav items without any problem. My main problem is that when the dashboard page navbar item is active, this is, the main page, doesn't matter what is on the view that i'm using on the hook, it just dissapears. Anyone knows why it has this behavior? Images below for some context. One image shows that it completely hides search input. In the other image it shows how it behaves when any other nav item is active. Upon inspecting the page, the element is just gone when the dashboard is active.
No description
No description
1 Reply
Hugo
Hugo4mo ago
I realized the dashboard actually doesn't render any hook, all my hooks, like my footer just disapear. Is this the default behavior of a dashboard page? ended up changing where i register my hooks. Apparently it doesnt like when I render my hooks on the adminPanelProvider. Any Dashboard ends up hiding all existing hooks. Fixed by rendering my hooks in another provider.