Browse Source

fix: add type on AppInputText component

Muhammad Iqbal Afandi 3 years ago
parent
commit
f47721f7cc
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      resources/js/components/AppInputText.vue

+ 5
- 1
resources/js/components/AppInputText.vue View File

@@ -14,6 +14,10 @@ const props = defineProps({
14 14
     type: String,
15 15
     required: true,
16 16
   },
17
+  type: {
18
+    type: String,
19
+    default: 'text',
20
+  },
17 21
   error: {
18 22
     type: String,
19 23
     default: null,
@@ -38,8 +42,8 @@ const ariaDescribedbyLabel = computed(
38 42
 
39 43
     <InputText
40 44
       class="w-full"
41
-      type="text"
42 45
       :class="{ 'p-invalid': isError }"
46
+      :type="type"
43 47
       :id="forLabel"
44 48
       :aria-describedby="ariaDescribedbyLabel"
45 49
       :model-value="modelValue"