Hi Michael,
Yes, this behavior can occur when using a Sidebar with Type="Push" alongside a DashboardLayout. The DashboardLayout calculates its panel widths based on the available container size when it is rendered. When the sidebar is opened or closed, the available width changes, but the DashboardLayout may not automatically recalculate its dimensions until a browser resize event occurs. Syncfusion has previously recommended refreshing the DashboardLayout after the Sidebar layout change to ensure the panels are sized correctly.
You can force the DashboardLayout to recalculate its size by calling RefreshAsync() when the Sidebar state changes:
<SfSidebar @bind-IsOpen="SidebarOpen"
Changed="OnSidebarChanged"
Type="SidebarType.Push">
</SfSidebar>
<SfDashboardLayout @ref="Dashboard"
Columns="12">
...
</SfDashboardLayout>
@code {
private SfDashboardLayout? Dashboard;
private bool SidebarOpen = true;
private async Task OnSidebarChanged()
{
// Allow the sidebar animation/layout update to complete
await Task.Delay(150);
if (Dashboard != null)
{
await Dashboard.RefreshAsync();
}
}
}
If the issue occurs during the initial page load, you can also trigger a refresh after the dashboard is first rendered:
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender && Dashboard != null)
{
await Task.Delay(150);
await Dashboard.RefreshAsync();
}
}
This should force the DashboardLayout to recalculate panel widths whenever the sidebar is initialized, opened, or closed, preventing full-width panels (SizeX equal to the configured column count) from overflowing beyond the browser window.
Regards,
Priyanka K