Skip to content

Commit

Permalink
fix(Input): avoid binding value when type is file (#2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eazash authored Sep 3, 2024
1 parent 0527f8d commit 82313e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/runtime/components/forms/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
:id="inputId"
ref="input"
:name="name"
:value="modelValue"
:type="type"
:required="required"
:placeholder="placeholder"
:disabled="disabled"
:class="inputClass"
v-bind="attrs"
v-bind="type === 'file' ? attrs : { ...attrs, value: modelValue }"
@input="onInput"
@blur="onBlur"
@change="onChange"
Expand Down

2 comments on commit 82313e8

@Foddy
Copy link

@Foddy Foddy commented on 82313e8 Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reasons this also applies to other field types like text? I cannot apply a :value on type text fields?

@valh1996
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Foddy, take a look here: #2238 (comment)

Please sign in to comment.