Fixed #1586 - InputSwitch - trueValue-falseValue features causes warning

pull/1595/head
Yiğit FINDIKLI 2021-09-22 14:14:21 +03:00
parent 8c9c0864df
commit 6648de2769
1 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,8 @@
<template>
<div :class="containerClass" @click="onClick($event)" :style="style">
<div class="p-hidden-accessible">
<input ref="input" type="checkbox" :checked="modelValue" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" @keydown.enter.prevent="onClick($event)"
role="switch" :aria-checked="modelValue">
<input ref="input" type="checkbox" :checked="checked" v-bind="$attrs" @focus="onFocus($event)" @blur="onBlur($event)" @keydown.enter.prevent="onClick($event)"
role="switch" :aria-checked="checked">
</div>
<span class="p-inputswitch-slider"></span>
</div>
@ -14,7 +14,10 @@ export default {
inheritAttrs: false,
emits: ['click', 'update:modelValue', 'change', 'input'],
props: {
modelValue: Boolean,
modelValue: {
type: null,
default: false
},
class: null,
style: null,
trueValue: {