From b707f8425eb88f1023bc0d87ebdbc5a10185e7ea Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Mon, 24 Oct 2022 17:02:44 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=83=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/Search.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index 582b646..c29382c 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -111,7 +111,7 @@ - +
@@ -233,9 +233,13 @@ const componentOptions = { this.updateSearchFromRouteQuery(this.$route); }, list: { - handler() { - this.updatePageCount(); + handler(newValue) { this.updateGenreTreeIfNeeded(); + + if (this.prevList.totalFound != newValue.totalFound) + this.updatePageCount(); + + this.prevList = _.cloneDeep(newValue); }, deep: true, }, @@ -278,6 +282,7 @@ class Search { limit = 20; //stuff + prevList = {}; list = { queryFound: -1, totalFound: 0,