Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sider collapsedWidth not work in Menu #30355

Closed
1 task
zhuwy opened this issue Apr 29, 2021 · 1 comment · Fixed by #30357
Closed
1 task

Sider collapsedWidth not work in Menu #30355

zhuwy opened this issue Apr 29, 2021 · 1 comment · Fixed by #30357

Comments

@zhuwy
Copy link

zhuwy commented Apr 29, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

set Sider prop collapsedWidth={60}
collapse the Sider

What is expected?

Menu width is 60

What is actually happening?

Menu width is 80 (which is the defaultValue of the collapsedWidth prop in Sider)

Environment Info
antd 4.15.3
React 16.14.0
System macOS Catalina 10.15.7
Browser chrome 90.0.4430.85

notice that the .ant-menu-inline-collapsed class seem to has hardcode style:
width: 80px

@xrkffgg
Copy link
Member

xrkffgg commented Apr 29, 2021

收起的时候 动态给 Menu 加一个 style={{ width: 60 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants