primefaces / primefaces/primereact
PanelMenu: expanded property doesn't work on the top list item
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
For the uncontrolled state, when PanelMenu's model.expanded property is set to true, the top list item is still collapsed.
For the nested list it works as expected (after opening the parent item)
Reproducer
https://stackblitz.com/edit/kp7quq?file=src%2FApp.jsx
System Information
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
Memory: 13.05 GB / 31.93 GB
Binaries:
Node: 20.10.0 - C:\Program Files\NodeJS 20.10.0\node.EXE
npm: 10.2.3 - C:\Program Files\NodeJS 20.10.0\npm.CMD
Browsers:
Edge: Chromium (130.0.2849.52)
Internet Explorer: 11.0.19041.4355
npmPackages:
primereact: ^10.8.4 => 10.8.4
react: ^18.2.0 => 18.2.0
Steps to reproduce the behavior
- Go to https://stackblitz.com/edit/kp7quq?file=src%2FApp.jsx
- See the result. The highlighted
expandedproperty is set to true while the component doesn't reflect it
Expected behavior
The PanelMenu component renders the expanded state for the items that has the expanded property set to true
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PanelMenu implementation and the App.jsx reproducer linked in StackBlitz. Reproduce the uncontrolled case with a top-level item whose model.expanded property is true, then verify that the top item renders expanded while nested items continue to work as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100