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

PanelMenu: Menu items with no sub-items toggling border #5349

Closed
akshayaqburst opened this issue Nov 20, 2023 · 3 comments · Fixed by #5359
Closed

PanelMenu: Menu items with no sub-items toggling border #5349

akshayaqburst opened this issue Nov 20, 2023 · 3 comments · Fixed by #5359
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@akshayaqburst
Copy link
Contributor

akshayaqburst commented Nov 20, 2023

Describe the bug

PanelMenu: Menu items with no sub-items toggling border

Reproducer

No response

PrimeReact version

10.1.0

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to Panel Menu
  2. Use a basic Panel Menu in your project
  3. Try building a menu item which has no sub items present in it.
  4. Click on the newly created menu item which has no sub items.
  5. It shows an empty space .

image

Expected behavior

Menu items with no sub-items should not toggle.

After fix -
image

@akshayaqburst akshayaqburst added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 20, 2023
akshayantony55 added a commit to qburst/primereact_qb_16 that referenced this issue Nov 20, 2023
akshayantony55 added a commit to qburst/primereact_qb_16 that referenced this issue Nov 20, 2023
@melloware melloware added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 20, 2023
@melloware melloware added this to the 10.2.0 milestone Nov 20, 2023
@melloware
Copy link
Member

I think it should be handled like this: primefaces/primevue#4844

The toggler should not even be shown:

image

@xiaodong2008
Copy link

I think it should be handled like this: primefaces/primevue#4844

The toggler should not even be shown:

image

Hi, thanks for your reference but I don’t think that remove the empty space or remove the icon is a good idea.
I think it should always show the sub-items menu and the icon if there is a items prop given, even it is empty,
Sometimes user may want to show an empty list.
If they don’t want the list, they should not add the items props.
Another way, maybe adding a tip text on the empty place is the best way to solve this problem.

@xiaodong2008
Copy link

xiaodong2008 commented Nov 21, 2023

I think it should be handled like this: primefaces/primevue#4844
The toggler should not even be shown:
image

Hi, thanks for your reference but I don’t think that remove the empty space or remove the icon is a good idea. I think it should always show the sub-items menu and the icon if there is a items prop given, even it is empty, Sometimes user may want to show an empty list. If they don’t want the list, they should not add the items props. Another way, maybe adding a tip text on the empty place is the best way to solve this problem.

That’s mean

With items props but empty list:
Should show an empty space or show with some text like “This list is empty.”

With no items props but border changed when click:
This should be fixed like my Pull Request in primevue primefaces/primevue#4844

melloware added a commit to melloware/primereact that referenced this issue Nov 21, 2023
@melloware melloware assigned melloware and unassigned akshayaqburst Nov 21, 2023
melloware added a commit to melloware/primereact that referenced this issue Jan 9, 2024
melloware added a commit that referenced this issue Jan 9, 2024
* Fix #5349: PanelMenu fix from PrimeVue

* Fix #5360: Cascade select popup not closing on escape

* fix: #5363, Mention: Page Breaks when navigating to Mention component

* fix: #5365 SplitButton popup not closing on escape button click

* Fix #5367: SpeedDial close on escape

* Fix #2666: Fix overlay components in cell editor

* Fix #5363: Mention better fix

* Fix #5379: Accordion tab header passthrough errors
Fix #5546: AccordionTab Tailwind issues

* Fix #5385: Password inputClassname missing

* Fix #5390: Calendar only render navigator in first month of multiple months

* Fix #5202: Calendar rendering performance increase

* Fix #5535: Calendar update input on locale change

* Fix #5533/#4147: Calendar respect viewDate

* Fix Calendar Input Docs

* fix:Calendar:currentView changed should invoke alignOverlay

* Fix #5379: Accordion tab header passthrough errors
Fix #5546: AccordionTab Tailwind issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
3 participants