🐛 fix: bug fixed
This commit is contained in:
parent
66cb7aa8a3
commit
121780cebe
|
@ -165,8 +165,8 @@ const labelState = computed(() => {
|
||||||
v-bind="attrs"
|
v-bind="attrs"
|
||||||
:class="[styles['text-body-MD-standard-text-Regular'], {
|
:class="[styles['text-body-MD-standard-text-Regular'], {
|
||||||
'p-inputtext': true,
|
'p-inputtext': true,
|
||||||
'error': props.isInvalid && !props.isValid && !props.disabled,
|
'error': props.isInvalid && !props.isValid && !props.disabled || !!props.errorMessage,
|
||||||
'success': !props.isInvalid && props.isValid && !props.disabled,
|
'success': !props.isInvalid && props.isValid && !props.disabled && !props.errorMessage,
|
||||||
}]"
|
}]"
|
||||||
:disabled="props.disabled"
|
:disabled="props.disabled"
|
||||||
:aria-disabled="props.disabled"
|
:aria-disabled="props.disabled"
|
||||||
|
@ -180,7 +180,7 @@ const labelState = computed(() => {
|
||||||
role="alert"
|
role="alert"
|
||||||
aria-live="polite"
|
aria-live="polite"
|
||||||
>
|
>
|
||||||
<template v-if="Array.isArray(props.errorMessage)">
|
<template v-if="Array.isArray(props.errorMessage) && props.isInvalid">
|
||||||
<VHint
|
<VHint
|
||||||
v-for="message in props.errorMessage"
|
v-for="message in props.errorMessage"
|
||||||
:id="descriptionId"
|
:id="descriptionId"
|
||||||
|
@ -192,7 +192,7 @@ const labelState = computed(() => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<VHint
|
<VHint
|
||||||
v-else-if="errorMessage"
|
v-else-if="errorMessage && props.isInvalid"
|
||||||
:id="descriptionId"
|
:id="descriptionId"
|
||||||
:key="`error-${errorMessage}`"
|
:key="`error-${errorMessage}`"
|
||||||
:data-testid="descriptionId"
|
:data-testid="descriptionId"
|
||||||
|
@ -200,7 +200,7 @@ const labelState = computed(() => {
|
||||||
type="alert"
|
type="alert"
|
||||||
icon
|
icon
|
||||||
/>
|
/>
|
||||||
<template v-if="Array.isArray(props.validMessage)">
|
<template v-if="Array.isArray(props.validMessage) && props.isValid">
|
||||||
<VHint
|
<VHint
|
||||||
v-for="message in props.validMessage"
|
v-for="message in props.validMessage"
|
||||||
:id="descriptionId"
|
:id="descriptionId"
|
||||||
|
@ -212,7 +212,7 @@ const labelState = computed(() => {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<VHint
|
<VHint
|
||||||
v-else-if="validMessage"
|
v-else-if="validMessage && props.isValid"
|
||||||
:id="descriptionId"
|
:id="descriptionId"
|
||||||
:key="`error-${validMessage}`"
|
:key="`error-${validMessage}`"
|
||||||
:data-testid="descriptionId"
|
:data-testid="descriptionId"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user