Skip to content

Commit 6a59ef7

Browse files
committed
Fix
1 parent 9dc00a3 commit 6a59ef7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/pages/explore.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,19 @@ export default defineComponent({
7373
const specialists = filterQueryReactive('specialists')
7474
const languages = filterQueryReactive('languages')
7575
const filter = reactive({ page, specialists, languages, sortBy })
76-
const throttledGetIdeas = useThrottleFn(
77-
async () => await getIdeas(filter),
78-
500,
79-
)
76+
const throttledGetIdeas = useThrottleFn(async () => {
77+
await getIdeas(filter)
78+
}, 500)
8079
80+
watch(
81+
() => filter.page,
82+
(newPage, oldPage) => {
83+
if (oldPage === newPage) {
84+
filter.page = 1
85+
}
86+
},
87+
{ deep: true },
88+
)
8189
// TODO: reactify function
8290
watch(filter, throttledGetIdeas)
8391

0 commit comments

Comments
 (0)