Skip to content

Commit

Permalink
fix(VField): only render field label if label is passed (#20722)
Browse files Browse the repository at this point in the history
fixes #20427
  • Loading branch information
SonTT19 authored Dec 3, 2024
1 parent 501fa1b commit 8b9cca4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/vuetify/src/components/VField/VField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,11 @@ export const VField = genericComponent<new <T>(
</VFieldLabel>
)}

<VFieldLabel ref={ labelRef } for={ id.value }>
{ label() }
</VFieldLabel>
{ hasLabel.value && (
<VFieldLabel key="label" ref={ labelRef } for={ id.value }>
{ label() }
</VFieldLabel>
)}

{ slots.default?.({
...slotProps.value,
Expand Down

0 comments on commit 8b9cca4

Please # to comment.