Skip to content

Commit

Permalink
Fix the refresh button on the DB run list page
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Feb 23, 2024
1 parent 1a0daf3 commit c294f52
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/views/db/RunsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,17 @@ const loading = refThrottled(
);
// const loading = computed(() => fetching.value);
function resetQueryVariables() {
page.value = initialPage;
itemsPerPage.value = initialItemsPerPage;
// reactiveQueryVariables.value = { ...initialQueryVariables };
async function resetQueryVariables() {
if (
JSON.stringify(page.value) === JSON.stringify(initialPage) &&
itemsPerPage.value === initialItemsPerPage
) {
await refresh();
} else {
page.value = initialPage;
itemsPerPage.value = initialItemsPerPage;
// refresh() will be called as they are reactive
}
}
watch(itemsPerPage, () => {
Expand Down

0 comments on commit c294f52

Please sign in to comment.