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

DataTable bug when clicked in rowExpansion icon with selectionMode="single". #5074

Closed
datacampsis opened this issue Oct 10, 2023 · 0 comments · Fixed by #5075
Closed

DataTable bug when clicked in rowExpansion icon with selectionMode="single". #5074

datacampsis opened this issue Oct 10, 2023 · 0 comments · Fixed by #5075
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@datacampsis
Copy link
Contributor

Describe the bug

In a DataTable component, when the props rowExpansion and selectionMode are active simultaneously, clicking directly on the icon in the expander column triggers the onSelectionChange function. If this function redirects to another page, it could pose a problem, and for users, it may not provide a positive experience.

Reproducer

https://stackblitz.com/edit/react-m38mg5-je4vzs?file=src%2FApp.js

PrimeReact version

10.0.2

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

  1. Position the mouse over the arrow icon.
  2. Click and you will see that in addition to expanding, it activates the function onSelectionChange

Expected behavior

Expected just expand the row.

@datacampsis datacampsis added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 10, 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 Oct 10, 2023
@melloware melloware self-assigned this Oct 10, 2023
@melloware melloware added this to the 10.0.3 milestone Oct 10, 2023
melloware added a commit to melloware/primereact that referenced this issue Oct 10, 2023
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