Skip to content

Menu.Item can be hidden in horizontal mode #35117

@nasreddineskandrani

Description

@nasreddineskandrani

Hello,

Reproduction link

https://stackblitz.com/edit/react-7nox59?file=demo.js

Steps to reproduce

My stackblitz (demo.js file) already show a broken menu because PermissionComponent is returning null.

What is expected?

PermissionComponent should be able to return null and then the menu item wrapped should be ignored and hidden.
Important: The same code for a vertical mode of antd menu works

What is actually happening?

The menu crashed

Environment Info
antd 4.19.5
React 17
System All
Browser Chrome

I am forking the repo. and debugging it => in the little time i have each day it will take time :)
Thanks in advance for your help if you can solve it faster

Metadata

Metadata

Assignees

Labels

🐛 BugAnt Design Team had proved that this is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions