From dd08abc16349382d50bfdb40b3b736de8dd4f761 Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Thu, 14 Jul 2022 11:20:49 +0800 Subject: [PATCH] docs(kbutton): add comment on stripping falsy disabled attribute --- src/components/KButton/KButton.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/KButton/KButton.vue b/src/components/KButton/KButton.vue index 98dd74efb5..ebf5df6e33 100644 --- a/src/components/KButton/KButton.vue +++ b/src/components/KButton/KButton.vue @@ -164,7 +164,10 @@ export default defineComponent({ }) /** - * Strips falsy `disabled` attribute, so it does not fall onto native elements + * Strips falsy `disabled` attribute, so it does not fall onto native elements. + * Vue 3 no longer removes attribute if the value is boolean false. Instead, it's set as attr="false". + * So for , the rendered element will have `disabled="false"`, + * which is greyed out and cannot be interacted with. */ const strippedAttrs = computed((): typeof attrs => { const { disabled, ...restAttrs } = attrs