->collapsedSidebarWidth() not taking effect

What I am trying to do:
Adjust the width of the collapsed sidebar.
What I did:
Used ->collapsedSidebarWidth() with different values (like '9rem') as in the example at https://filamentphp.com/docs/3.x/panels/navigation#customizing-the-width-of-the-sidebar
My issue/the error:
The width of the collapsed sidebar does not change. Looking in vendor/filament/filament/resources/views/components/sidebar/index.blade.php I do see references to w-[--sidebar-width], but not to w-[--collapsed-sidebar-width]. Am I doing something wrong, or is this a bug?
Code:
<?php
class AdminPanelProvider extends PanelProvider {
public function panel(Panel $panel): Panel{
return $panel
// ...
->sidebarWidth('16rem') // Has effect on the full sidebar
->sidebarCollapsibleOnDesktop()
->collapsedSidebarWidth('9rem'); // Has no effect at all
}
}
<?php
class AdminPanelProvider extends PanelProvider {
public function panel(Panel $panel): Panel{
return $panel
// ...
->sidebarWidth('16rem') // Has effect on the full sidebar
->sidebarCollapsibleOnDesktop()
->collapsedSidebarWidth('9rem'); // Has no effect at all
}
}
2 Replies
Dennis Koch
Dennis Koch3mo ago
Yeah, looks like a bug. Can you open an issue on GitHub please?
Boustrophedon
BoustrophedonOP3mo ago
Will do! 👍

Did you find this page helpful?