Skip to content

Commit

Permalink
fix(ui): no more duplicate call to search due to auto refresh being on
Browse files Browse the repository at this point in the history
closes #3510
  • Loading branch information
brian-mulier-p committed Aug 6, 2024
1 parent d4ac7eb commit d81c6e5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/src/components/layout/RefreshButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
data() {
return {
autoRefresh: false,
autoRefresh: undefined,
refreshHandler: undefined
};
},
Expand Down Expand Up @@ -69,10 +69,12 @@
this.stopRefresh();
}
},
autoRefresh(newValue) {
autoRefresh(newValue, oldValue) {
if (newValue) {
this.refreshHandler = setInterval(this.triggerRefresh, 10000);
this.triggerRefresh()
if (oldValue !== undefined) {
this.triggerRefresh();
}
} else {
this.stopRefresh();
}
Expand Down

0 comments on commit d81c6e5

Please sign in to comment.