Add disable class to the outer div of DTHeaderCheckbox

At the moment, when the checkbox is disabled, the browser displays the "pointer" cursor because the root `div.p-checkbox` doesn't have the `p-disabled` class. Adding the `p-disabled` class to the root div solves the issue.
pull/2636/head
Néstor Pérez González 2022-06-06 12:22:46 +02:00 committed by GitHub
parent e3da9f2f58
commit 8594715ecc
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" @keydown.space.prevent="onClick">
<div :class="['p-checkbox p-component', {'p-checkbox-focused': focused, 'p-disabled': $attrs.disabled}]" @click="onClick" @keydown.space.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'" @focus="onFocus($event)" @blur="onBlur($event)">
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>