Skip to content

Commit

Permalink
fix: prevent row-click trigger when inner button clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
KumJungMin committed Oct 9, 2024
1 parent 9d9ae35 commit c2a5378
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/primevue/src/datatable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ export default {
const body = this.$refs.bodyRef && this.$refs.bodyRef.$el;
const focusedItem = findSingle(body, 'tr[data-p-selectable-row="true"][tabindex="0"]');
if (isClickable(event.currentTarget)) {
if (isClickable(event.target)) {
return;
}
Expand Down Expand Up @@ -811,7 +811,7 @@ export default {
this.rowTouched = false;
if (focusedItem) {
if (event.currentTarget?.getAttribute('data-pc-section') === 'rowtoggleicon') return;
if (event.target?.getAttribute('data-pc-section') === 'rowtoggleicon') return;
const targetRow = event.currentTarget?.closest('tr[data-p-selectable-row="true"]');
Expand Down

0 comments on commit c2a5378

Please sign in to comment.