ant-design / ant-design/pro-components

🐛[BUG] Customized prolayout menuItemRender cause side menu display issue when uncollapse sidemenu

Open
#8,475 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 Description

When customize menu item render through menuItemRender props to render label with icon.
![image](https://github.com/ant-design/pro-components/assets/44203829/41ef8a67-0b6b-490a-96f6-a835ef4f2c8d)

An unexpected submenu content is popup during uncollapse sidebar.

![image](https://github.com/ant-design/pro-components/assets/44203829/d077950d-716b-4832-b1d2-40bf63dcc4b1)

### 📷 复现步骤
code sandbox link
https://codesandbox.io/p/sandbox/vigilant-cohen-n3gg9m?file=/App.tsx:25,24

### © 版本信息

- ProComponents version: latest

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction, especially App.tsx around the referenced line, and reproduce the unexpected submenu popup when expanding the sidebar with a custom menuItemRender. Trace the ProLayout side-menu behavior shown there; done means the sidebar expands without displaying unintended submenu content while the customized label and icon still render.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.