Skip to content

Commit 09d5f0d

Browse files
committed
fix(PrimeInputText): icon tag was shown even when no icons should be used
1 parent a17aece commit 09d5f0d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/formkit/PrimeInputText.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ function hasRightIcon() {
1717
function spanClass() {
1818
let result = ''
1919
if (hasLeftIcon())
20-
result = `${result}p-input-icon-left `
20+
result = `p-formkit-icon ${result}p-input-icon-left `
2121
if (hasRightIcon())
22-
result = `${result}p-input-icon-right `
22+
result = `p-formkit-icon ${result}p-input-icon-right `
2323
return result
2424
}
2525
@@ -36,8 +36,8 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
3636

3737
<template>
3838
<div class="p-formkit">
39-
<span class="p-formkit-icon" :class="spanClass()">
40-
<i v-if="hasLeftIcon()" :class="context.iconLeft" />
39+
<span :class="spanClass()">
40+
<i v-if="hasLeftIcon()" :class="context?.iconLeft" />
4141

4242
<InputText
4343
:id="context.id"
@@ -56,7 +56,7 @@ const styleClass = computed(() => (context?.state.validationVisible && !context?
5656
@input="handleInput"
5757
@blur="handleBlur"
5858
/>
59-
<i v-if="hasRightIcon" :class="context.iconRight" />
59+
<i v-if="hasRightIcon()" :class="context?.iconRight" />
6060
</span>
6161
</div>
6262
</template>

0 commit comments

Comments
 (0)