From 4e5da41d35a9dc00372bdf4a2ea5e89113d51f96 Mon Sep 17 00:00:00 2001 From: Sandhya Veludandi Date: Sun, 14 Aug 2022 19:07:09 -0400 Subject: [PATCH] fix: page cursor and pagination (#5541) * fix: search results not displaying on first page * fix: page cursor position stays the same between page selection --- client/components/common/search-results.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/components/common/search-results.vue b/client/components/common/search-results.vue index 64c57f41..ddc33208 100644 --- a/client/components/common/search-results.vue +++ b/client/components/common/search-results.vue @@ -105,6 +105,9 @@ export default { } else { this.searchIsLoading = true } + }, + results() { + this.cursor = 0 } }, mounted() { @@ -153,6 +156,9 @@ export default { skip() { return !this.search || this.search.length < 2 }, + result() { + this.pagination = 1 + }, update: (data) => _.get(data, 'pages.search', {}), watchLoading (isLoading) { this.searchIsLoading = isLoading