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

Bug - NavItem - Icons don't show if there are complex children #11092

Closed
Tracked by #212
rebeccaalpert opened this issue Sep 30, 2024 · 3 comments
Closed
Tracked by #212

Bug - NavItem - Icons don't show if there are complex children #11092

rebeccaalpert opened this issue Sep 30, 2024 · 3 comments

Comments

@rebeccaalpert
Copy link
Member

rebeccaalpert commented Sep 30, 2024

Describe the problem
The NavItem lets you show an icon. However, this breaks if you pass in a child with a div.

How do you reproduce the problem?
If you give any NavItem a child that's wrapped in a div, the icon won't show: https://codesandbox.io/p/sandbox/agitated-babycat-rvrw7v?file=%2Findex.tsx%3A32%2C21&workspaceId=f5599198-6a68-44b3-85bd-1caed5609909

If you remove the div, the icon comes back.

Expected behavior
Icon should display consistently.

Is this issue blocking you?
No!

Copy link

github-actions bot commented Jan 7, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@thatblindgeye thatblindgeye modified the milestones: 2024.Q4, 2025.Q1 Jan 14, 2025
@thatblindgeye
Copy link
Contributor

This looks to be expected behavior when passing custom content like this. At the very least we should update documentation to make this clearer, with the possibility of revisiting this behavior.

@thatblindgeye
Copy link
Contributor

Will close this out as expected behavior. If others start bringing this up we can revisit this, though.

@thatblindgeye thatblindgeye closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in PatternFly Issues Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

4 participants