Skip to content

Commit

Permalink
fixed ref
Browse files Browse the repository at this point in the history
  • Loading branch information
TortitasT committed Sep 27, 2022
1 parent 7c61918 commit 5a5292f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/lib-components/UiInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</label>
</slot>

<input :id="id" :value="value" v-bind="$attrs" v-on="listeners" />
<input :id="id" :value="value" :ref="id" v-bind="$attrs" v-on="listeners" />

<span v-if="errorMessage" class="error">
{{ errorMessage }}
Expand Down Expand Up @@ -55,7 +55,7 @@ export default {
},
inputElement() {
return this.$el?.querySelector('input')
return this.$refs[this.id]
},
isRequired() {
Expand Down Expand Up @@ -84,11 +84,6 @@ export default {
},
},
// mounted() {
// // this.isValid = this.getisValid()
// // this.errorMessage = this.getErrorMessage()
// },
methods: {
getisValid() {
if (this.inputElement === undefined) {
Expand Down

0 comments on commit 5a5292f

Please sign in to comment.