Hi Raul,
We have checked your attached code sample. By default, sidebar component performs the (expand/collapse) operation only on its next sibling element, regardless of whatever the type(Push, Over, slide).
We suspect that the issue might have occurred due to any problem with below possible cases.
Please ensure the below cases are covered in your application.
1. The immediate sibling element of the Sidebar will be considered as the main content.
2. If the header element is the next immediate element of the Sidebar, then it will be considered as its main content. Sidebar will expand properly over its main container (i.e., header element) element.
3. If Dashboard Layout is not the main container element (or) a part of main container element of Sidebar. Then, Sidebar it will not expand over the Dashboard Layout component.
4. When target property is used, Sidebar expands over the next immediate element of its target element.
Any problems with implementing the Sidebar without taking into account the above cases can result as your stated problem.
So, to resolve the issue, you can wrap all the elements (whatever you want to display in right side content of the sidebar) in single div and place the element next to the sidebar element.
For your reference, we have prepared a sample. In which we have placed the Sidebar in the main layout page and render the Dashboard Layout inside the body element.
Refer the sample link below.
Please let us know, if you need any further assistance.
Regards,
Shameer Ali Baig S.