JumpToPageInput review fix

pull/3518/head^2
Bahadır Sofuoğlu 2023-01-10 11:09:59 +03:00
parent d1f36c76b3
commit 4cecc64cc7
1 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<JTPInput ref="jtpInput" v-model="inputVal" class="p-paginator-page-input" :aria-label="inputArialabel" :disabled="disabled"></JTPInput> <JTPInput ref="jtpInput" v-model="d_page" class="p-paginator-page-input" :aria-label="inputArialabel" :disabled="disabled"></JTPInput>
</template> </template>
<script> <script>
@ -16,18 +16,18 @@ export default {
}, },
data() { data() {
return { return {
inputVal: null d_page: null
}; };
}, },
watch: { watch: {
inputVal(newValue) { d_page(newValue) {
if (this.$refs.jtpInput && !this.$refs.jtpInput.focused) return; if (this.$refs.jtpInput && !this.$refs.jtpInput.focused) return;
this.$emit('page-change', newValue - 1); this.$emit('page-change', newValue - 1);
} }
}, },
mounted() { mounted() {
this.inputVal = this.page; this.d_page = this.page;
}, },
computed: { computed: {
inputArialabel() { inputArialabel() {