radzenhq / radzen-blazor

Radzen Blazor is a set of 70+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.32k stars 751 forks source link

Right sidebar does not show on smaller screens and ignores Responsive attribute #1579

Open LostBeard opened 5 days ago

LostBeard commented 5 days ago

Describe the bug There are 2 issues with right sidebar. Both issues show themselves when the window width is reduced. (window.innerWidth < 769px on my PC)

To Reproduce Steps to reproduce the behavior:

  1. Go to RadzenRightSidebarBug Demo
  2. Reduce the window width until the right sidebar auto-hides. This is bug. It should not auto-hide as Responsive="false" is set.
  3. Click on hamburger button (3 horizontal lines) that is suppose to show/hide the right sidebar. It does not show. This is another bug.

The demo is a clean .Net 8 "Blazor WebAssembly Standalone App" with the following changes:

Demo repo: RadzenRightSidebarBug

Expected behavior I expected the Responsive="false" attribute disable auto-hiding of the right sidebar on smaller screens like it does with the left sidebar, as described in the documentation.

I also expected the right sidebar to show when the Expanded parameter value is set to true even when on smaller screens.

Screenshots [NONE]

Desktop (please complete the following information):

akorchev commented 5 days ago

The problem is actually in RadzenBody:

@media (max-width: 768px) {
    body:has( > .rz-layout) {
        overflow-x: hidden;
    }

    .rz-header, .rz-footer, .rz-body {
        width: 100vw; // <- always
    }
}

Try <RadzenBody style="width: auto">. Probably we need a more specific CSS rule which accounts for sidebars cc @yordanov

LostBeard commented 5 days ago

Try <RadzenBody style="width: auto">.

Excellent. The right sidebar works as expected after adding that. Thank you for such an amazingly quick and helpful reply.

LostBeard commented 5 days ago

Your recommendation solves the issue for me. You may close this issue at your discretion.