fix: prevent row-click trigger when inner button clicked

pull/6544/head
KumJungMin 2024-10-09 13:34:53 +09:00
parent 9d9ae356d0
commit c2a5378b9d
1 changed files with 2 additions and 2 deletions

View File

@ -734,7 +734,7 @@ export default {
const body = this.$refs.bodyRef && this.$refs.bodyRef.$el; const body = this.$refs.bodyRef && this.$refs.bodyRef.$el;
const focusedItem = findSingle(body, 'tr[data-p-selectable-row="true"][tabindex="0"]'); const focusedItem = findSingle(body, 'tr[data-p-selectable-row="true"][tabindex="0"]');
if (isClickable(event.currentTarget)) { if (isClickable(event.target)) {
return; return;
} }
@ -811,7 +811,7 @@ export default {
this.rowTouched = false; this.rowTouched = false;
if (focusedItem) { 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"]'); const targetRow = event.currentTarget?.closest('tr[data-p-selectable-row="true"]');