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

OrderList: Button with icon in itemTemplate, icon does not respond to click #7638

Open
codalf opened this issue Jan 22, 2025 · 2 comments
Open
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@codalf
Copy link

codalf commented Jan 22, 2025

Describe the bug

When using a button with icon inside an item of an OrderList, the button's onClick handler does not execute, when the icon is clicked. Clicking on the button text works as expected.

Reproducer

https://stackblitz.com/edit/avzsga3i?file=src%2FApp.jsx

System Information

"react": "18.3.1",
    "react-dom": "18.3.1",
    "react-transition-group": "^4.4.5",
    "primereact": "latest",

Steps to reproduce the behavior

  1. Open console
  2. Click on one of the button texts => console says 'Clicked!'
  3. Click on one of the check icons => no console otput

Expected behavior

button click handler should always execute when clicking on the button icon

@codalf codalf added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 22, 2025
@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 Jan 22, 2025
@codalf
Copy link
Author

codalf commented Jan 24, 2025

I found out, that this is a regression between 10.8.5 and 10.9.0
Before 10.9.0 it worked

@codalf
Copy link
Author

codalf commented Jan 24, 2025

I also found out, that it works, if the click handler is not placed inside the itemTemplate function.

Another work-around is to use onMouseDown instead of onClick

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

No branches or pull requests

2 participants