We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b801812 commit 34feb7aCopy full SHA for 34feb7a
src/components/PrimeInputText.vue
@@ -18,7 +18,11 @@ const props = defineProps({
18
},
19
})
20
21
-function hasIcon() {
+const hasIcon = computed(() => {
22
+ if (props.context?.icon && props.context?.icon.length > 0) {
23
+ return true
24
+ }
25
+
26
return props.context?.attrs?.icon && props.context?.attrs?.icon.length > 0
27
}
28
@@ -36,7 +40,7 @@ const styleClass = computed(() => (props.context?.state.validationVisible && !pr
36
40
<template>
37
41
<div class="p-formkit">
38
42
{{ context.attrs.icon }}
39
- <IconField v-if="hasIcon()" :icon-position="context?.attrs.iconPosition">
43
+ <IconField v-if="hasIcon" :icon-position="context?.attrs.iconPosition">
44
<InputIcon :class="context.attrs.icon" />
45
<InputText
46
:id="context.id"
0 commit comments