Merge pull request #2260 from harveylee/fix-row-checkbox-event-propagation

Add stop modifier to RowCheckbox click event
pull/2309/head
Tuğçe Küçükoğlu 2022-03-14 11:19:27 +03:00 committed by GitHub
commit 3c03064c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="['p-checkbox p-component', {'p-checkbox-focused': focused}]" @click="onClick"> <div :class="['p-checkbox p-component', {'p-checkbox-focused': focused}]" @click.stop.prevent="onClick">
<div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" <div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]"
role="checkbox" :aria-checked="checked" :tabindex="$attrs.disabled ? null : '0'" @keydown.space.prevent="onClick" @focus="onFocus($event)" @blur="onBlur($event)"> role="checkbox" :aria-checked="checked" :tabindex="$attrs.disabled ? null : '0'" @keydown.space.prevent="onClick" @focus="onFocus($event)" @blur="onBlur($event)">
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span> <span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>