F
Filament15mo ago
Gush

RenderHook view hidden on collapsed menu

Hey, is there a way to hide a renderhook if the menu is collapsed? thanks
Filament::registerRenderHook(
'sidebar.end',
fn (): View => view('filament.logoIPT.logo'),
);
Filament::registerRenderHook(
'sidebar.end',
fn (): View => view('filament.logoIPT.logo'),
);
1 Reply
Patrick Boivin
Patrick Boivin15mo ago
I think this can be done by hooking into the $store.sidebar.isOpen state from inside of your view. For example, you could wrap everything in a div like this:
<div x-data="{}" x-show="$store.sidebar.isOpen">
...
</div>
<div x-data="{}" x-show="$store.sidebar.isOpen">
...
</div>
Want results from more Discord servers?
Add your server