Skip to content

Commit 4e5da41

Browse files
fix: page cursor and pagination (#5541)
* fix: search results not displaying on first page * fix: page cursor position stays the same between page selection
1 parent fdeb4a4 commit 4e5da41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/components/common/search-results.vue

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ export default {
105105
} else {
106106
this.searchIsLoading = true
107107
}
108+
},
109+
results() {
110+
this.cursor = 0
108111
}
109112
},
110113
mounted() {
@@ -153,6 +156,9 @@ export default {
153156
skip() {
154157
return !this.search || this.search.length < 2
155158
},
159+
result() {
160+
this.pagination = 1
161+
},
156162
update: (data) => _.get(data, 'pages.search', {}),
157163
watchLoading (isLoading) {
158164
this.searchIsLoading = isLoading

0 commit comments

Comments
 (0)