Skip to content

Commit

Permalink
Merge pull request #38 from ThatOneCalculator/main
Browse files Browse the repository at this point in the history
Handle number input with type="text" but retain other number validators.
  • Loading branch information
ejirocodes authored Feb 29, 2024
2 parents 1d000f8 + 098b24b commit d092201
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/single-otp-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default defineComponent({
input,
model,
inputTypeValue:
props.inputType === "letter-numeric" ? "text" : props.inputType,
["letter-numeric", "number"].includes(props.inputType) ? "text" : props.inputType,
};
},
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/vue3-otp-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default /* #__PURE__ */ defineComponent({
},
separator: {
type: String,
default: "**",
default: "",
},
inputClasses: {
type: [String, Array] as PropType<string[] | string>,
Expand Down Expand Up @@ -57,7 +57,7 @@ export default /* #__PURE__ */ defineComponent({
>,
validator: (value: string) =>
["numeric", "text", "tel", "none"].includes(value),
default: "numeric",
default: "text",
},
shouldAutoFocus: {
type: Boolean,
Expand Down

0 comments on commit d092201

Please sign in to comment.