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

Split Button throws error when expanding the menu. #3228

Closed
cwray-sdc opened this issue Sep 1, 2022 · 2 comments · Fixed by #3229
Closed

Split Button throws error when expanding the menu. #3228

cwray-sdc opened this issue Sep 1, 2022 · 2 comments · Fixed by #3229
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@cwray-sdc
Copy link

Describe the bug

item is undefined in primereact\components\lib\splitbutton\SplitButtonItem.js.

Reproducer

No response

PrimeReact version

8.5.0-SNAPSHOT

React version

17.x

Language

ALL

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

Steps to reproduce.

  1. Check out master.
  2. Install and build
  3. Navigate to Split Button page and expand a menu.

Expected behavior

Expected: menu expands

Actual:

TypeError: Cannot read properties of undefined (reading 'visible')

  21 | const createMenuitem = () => {
> 22 |     if (item.visible === false) {
@cwray-sdc cwray-sdc 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 1, 2022
@cwray-sdc
Copy link
Author

Fix for this is here: cwray-sdc@2cf108f

@melloware
Copy link
Member

Great catch!

@melloware melloware added Core Team Issue or pull request has been *opened* by a member of Core Team 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 1, 2022
@melloware melloware added this to the 8.5.0 milestone Sep 1, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 1, 2022
@mertsincan mertsincan removed the Core Team Issue or pull request has been *opened* by a member of Core Team label Sep 6, 2022
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.

3 participants