You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
Presently, in Layout Sider, the collapsible sider is in position:relative by default. To use a fixed sider, we must use a non-collapsible design because when position is set as fixed for the sider, the content of the Layout is manually set to 200px to the right.
Collapsible navigation is a great tool, but cannot be used in fixed mode and this causes multiple problem:
When we set 200px for margin-right, we have to manually change this value in the content css which is not good design. It's not good design because, let's say we have layout A, B, C. A is the parent component containing B and C. B is the sider, and C is the content. If we do not have redux setup (for simple projects), communication of this 200px/collapse status/animation of content sliding becomes a tedious task.
What does the proposed API look like?
The solution is really simple. For the first children inside a sider, there is a div with the class: .ant-layout-sider-children.
I was thinking, we check if(collapsible && position==fixed), then we add the following css rules to the above-mentioned class:
What problem does this feature solve?
Presently, in
Layout Sider
, thecollapsible sider
is inposition:relative
by default. To use afixed sider
, we must use a non-collapsible design because when position is set as fixed for the sider, the content of theLayout
is manually set to 200px to the right.Collapsible navigation is a great tool, but cannot be used in fixed mode and this causes multiple problem:
What does the proposed API look like?
The solution is really simple. For the first children inside a sider, there is a div with the
class
:.ant-layout-sider-children
.I was thinking, we check
if(collapsible && position==fixed)
, then we add the following css rules to the above-mentioned class:This fixes all the problem, and we can use fixed collapsible navigation with a really easy fix.
I am willing to submit a PR to fix this, I just need to be guided in the right direction.
Thanks in advance!
The text was updated successfully, but these errors were encountered: