From 6530cc61b04bdc5c19729b9d108efa2c18dd12c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Mon, 16 Jan 2023 13:54:20 +0300 Subject: [PATCH 1/3] JumpToPageInput fixed --- components/paginator/JumpToPageInput.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/paginator/JumpToPageInput.vue b/components/paginator/JumpToPageInput.vue index 765837a97..3fe3e3874 100644 --- a/components/paginator/JumpToPageInput.vue +++ b/components/paginator/JumpToPageInput.vue @@ -24,11 +24,14 @@ export default { if (this.$refs.jtpInput && !this.$refs.jtpInput.focused) return; this.$emit('page-change', newValue - 1); + }, + page: { + handler(newValue) { + this.d_page = newValue; + }, + immediate: true } }, - mounted() { - this.d_page = this.page; - }, computed: { inputArialabel() { return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.jumpToPageInputLabel : undefined; From 6ba55cd475cde4ab6360f19aa33a8d9c400380b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Mon, 16 Jan 2023 14:51:32 +0300 Subject: [PATCH 2/3] Immediate removed for mounted event issue --- components/paginator/JumpToPageInput.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/components/paginator/JumpToPageInput.vue b/components/paginator/JumpToPageInput.vue index 3fe3e3874..5f715da1c 100644 --- a/components/paginator/JumpToPageInput.vue +++ b/components/paginator/JumpToPageInput.vue @@ -16,20 +16,15 @@ export default { }, data() { return { - d_page: null + d_page: this.page }; }, watch: { d_page(newValue) { - if (this.$refs.jtpInput && !this.$refs.jtpInput.focused) return; - this.$emit('page-change', newValue - 1); }, - page: { - handler(newValue) { - this.d_page = newValue; - }, - immediate: true + page(newValue) { + this.d_page = newValue; } }, computed: { From d1488076fd2447d1ab785b43738593d6f8ac9f2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 16 Jan 2023 15:22:22 +0300 Subject: [PATCH 3/3] Refactor #3538 --- components/paginator/JumpToPageInput.vue | 13 +++++++++---- components/paginator/Paginator.vue | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/components/paginator/JumpToPageInput.vue b/components/paginator/JumpToPageInput.vue index 5f715da1c..7b5ec3f76 100644 --- a/components/paginator/JumpToPageInput.vue +++ b/components/paginator/JumpToPageInput.vue @@ -1,5 +1,5 @@