Skip to content

Commit

Permalink
Merge pull request #5413 from getkirby/fix/5369-text-field-input-type
Browse files Browse the repository at this point in the history
Text field: use `text` input if no specific input
  • Loading branch information
bastianallgeier authored Jul 27, 2023
2 parents 000131a + 45779ef commit 4722c4e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions panel/src/components/Forms/Field/TextField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
v-bind="$props"
:id="_uid"
ref="input"
:type="inputType"
theme="field"
v-on="$listeners"
/>
Expand All @@ -32,6 +33,15 @@ import counter from "@/mixins/forms/counter.js";
export default {
mixins: [Field, Input, TextInput, counter],
inheritAttrs: false,
computed: {
inputType() {
if (this.$helper.isComponent(`k-${this.type}-input`)) {
return this.type;
}
return "text";
}
},
methods: {
focus() {
this.$refs.input.focus();
Expand Down

0 comments on commit 4722c4e

Please sign in to comment.