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

MegaMenu: click not navigating to url #4956

Closed
shedali opened this issue Sep 25, 2023 · 1 comment · Fixed by #4957
Closed

MegaMenu: click not navigating to url #4956

shedali opened this issue Sep 25, 2023 · 1 comment · Fixed by #4957
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@shedali
Copy link

shedali commented Sep 25, 2023

Describe the bug

Attempting to pass url to MenuItem but click is not registered at the top level. It works for submenu items only.

codesandbox

Reproducer

https://codesandbox.io/s/primereact-demo-forked-2nxnlm?file=/src/App.js

PrimeReact version

9.6.2

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome

Steps to reproduce the behavior

click on the top level link 'this doesn't work'

Expected behavior

it should navigate to the page defined by the url parameter.

@shedali shedali added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 25, 2023
@melloware melloware self-assigned this Sep 25, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 25, 2023
@melloware melloware added this to the 10.0.0 milestone Sep 25, 2023
melloware added a commit to melloware/primereact that referenced this issue Sep 25, 2023
melloware added a commit to melloware/primereact that referenced this issue Sep 25, 2023
@melloware
Copy link
Member

Good catch. PR submitted. It can now be a URL if the top level menu doesn't have any subitems like in your example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants