Skip to content

Commit 9daf8dc

Browse files
committed
reset page on query change
1 parent 8c7b888 commit 9daf8dc

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

components/Metrics/AdminDataservicesPage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const page = ref(1)
178178
const pageSize = ref(20)
179179
const q = ref('')
180180
const qDebounced = refDebounced(q, config.public.searchDebounce)
181+
watch(qDebounced, () => page.value = 1)
181182
const sortedBy = ref<DataserviceSortedBy>('title')
182183
const direction = ref<SortDirection>('desc')
183184
const sortDirection = computed(() => `${direction.value === 'asc' ? '' : '-'}${sortedBy.value}`)

components/Metrics/AdminDatasetsPage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ const page = ref(1)
215215
const pageSize = ref(20)
216216
const q = ref('')
217217
const qDebounced = refDebounced(q, config.public.searchDebounce)
218+
watch(qDebounced, () => page.value = 1)
218219
219220
const sortedBy = ref<DatasetSortedBy>('created')
220221
const direction = ref<SortDirection>('desc')

components/Metrics/AdminReusesPage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ const page = ref(1)
190190
const pageSize = ref(20)
191191
const q = ref('')
192192
const qDebounced = refDebounced(q, config.public.searchDebounce)
193+
watch(qDebounced, () => page.value = 1)
193194
const sortedBy = ref<ReuseSortedBy>('created')
194195
const direction = ref<SortDirection>('desc')
195196
const sortDirection = computed(() => `${direction.value === 'asc' ? '' : '-'}${sortedBy.value}`)

0 commit comments

Comments
 (0)