Add stop modifier to RowCheckbox click event

To prevent clicks from propagating through to the row and triggering a row select/unselect event which undoes the effect.
pull/2260/head
Harvey Lee 2022-03-04 16:04:27 +11:00 committed by GitHub
parent 5844180d8e
commit 2c1148648d
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>
<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}]"
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>