-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Data Table row checkboxes propagate click events leading to double-handling of row select/unselect #3605
Comments
Fix in Pull-Request #3613 |
I have created a demo https://stackblitz.com/edit/angular-3qwyq2?file=src%2FApp.vue and can't see the problem. |
We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days. |
I didn't look closer where exactly, but the problem was fixed within version When I select primevue version Thanks for the effort looking into this and have a nice day! |
Describe the bug
Row checkboxes in data table don't stop event propagation.
If a data table uses selectionMode="multiple" as well as a column with selectionMode="multiple", click events will fire twice, e.g. unselecting and then reselecting the row.
The same Bug was reported on Mar. 4, 2022 in issue #2259. Fixed in 3.13 with #2260, but apparently reintroduced in a later version.
Reproducer
https://codesandbox.io/s/epic-scott-cxx2h5?file=/src/App.vue
PrimeVue version
3.22.4
Vue version
3.x
Language
ALL
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
See the CodeSandbox for demo, or create a data table with selectionMode="multiple" as well as a column with selectionMode="multiple"
The row is still selected because the click triggers both the checkbox's and the row's @click events.
Expected behavior
Row checkbox stops event propagation so click events don't fire twice, e.g. unselecting and then reselecting the row from just one click
The text was updated successfully, but these errors were encountered: