Skip to content

Commit

Permalink
fix(experimental/Select): fix hint and error not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Aug 2, 2023
1 parent 8b739b6 commit 913fecc
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions packages/select/src/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const props = withDefaults(
offset: 8,
shift: true,
flip: true,
hideError: false,
},
);
Expand Down Expand Up @@ -170,7 +171,7 @@ defineSlots<{
}) => any;
hint?: (props: {hint?: string}) => any;
error?: (props: {
error: boolean;
error?: boolean;
errorMessage?: string;
hideError?: boolean;
}) => any;
Expand Down Expand Up @@ -369,16 +370,16 @@ defineSlots<{
</component>
</component>
</Transition>
<div class="v-select-hint">
<slot name="hint" :hint="hint">
{{ hint }}
</slot>
</div>
<div v-if="error && !hideError" class="v-select-error">
<slot name="error" v-bind="{error, errorMessage, hideError}">
{{ errorMessage }}
</slot>
</div>
</Float>
<div class="v-select-hint">
<slot name="hint" :hint="hint">
{{ hint }}
</slot>
</div>
<slot name="error" v-bind="{error, errorMessage, hideError}">
<div class="v-select-error" v-if="error && !hideError">
{{ errorMessage }}
</div>
</slot>
</component>
</template>

0 comments on commit 913fecc

Please sign in to comment.