From 34feb7a8c464610e299de56c4b4ac714b203e8c1 Mon Sep 17 00:00:00 2001 From: kswzr Date: Mon, 18 Mar 2024 17:13:26 +0100 Subject: [PATCH 1/3] fix: allow reactivity of icon attribute --- src/components/PrimeInputText.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/PrimeInputText.vue b/src/components/PrimeInputText.vue index be67293a..22ad330c 100644 --- a/src/components/PrimeInputText.vue +++ b/src/components/PrimeInputText.vue @@ -18,7 +18,11 @@ const props = defineProps({ }, }) -function hasIcon() { +const hasIcon = computed(() => { + if (props.context?.icon && props.context?.icon.length > 0) { + return true + } + return props.context?.attrs?.icon && props.context?.attrs?.icon.length > 0 } @@ -36,7 +40,7 @@ const styleClass = computed(() => (props.context?.state.validationVisible && !pr