fix(shell): sageReloadMenu always sets sidebar width and updates toggle icon
Previously sageReloadMenu only set sidebar width when collapsed (64px). When expanded, the inline width was never restored, leaving the sidebar potentially stuck at collapsed width after menu rebuild. The menu text widgets (filler class with overflow:hidden) would clip labels to ~1 char. Now both collapsed (64px) and expanded (240px) states explicitly set sidebar.el.style.width and updateSidebarIcon after menu rebuild.
This commit is contained in:
parent
aebce71599
commit
e7045ab6ba
@ -185,9 +185,10 @@
|
||||
var w = await bricks.widgetBuild(desc, sidebar);
|
||||
if (w) {
|
||||
sidebar.addSubWidget(w);
|
||||
// Re-apply collapsed state and inline width to newly built menu
|
||||
// Re-apply sidebar width and collapsed state to newly built menu
|
||||
sidebar.el.style.width = isCollapsed ? '64px' : '240px';
|
||||
updateSidebarIcon(isCollapsed);
|
||||
if (isCollapsed) {
|
||||
sidebar.el.style.width = '64px';
|
||||
var menu = bricks.getWidgetById('global_nav_menu', bricks.app);
|
||||
if (menu && menu.collapse) {
|
||||
menu.collapse();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user