Skip to content

Commit 1de6f69

Browse files
committed
disable buttons while loading
1 parent 3757c1a commit 1de6f69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/ui/src/components/log_view.ts

+9
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,26 @@ export class LogView {
5151
this.renderLogs()
5252
}
5353

54+
private setLoading(isLoading: boolean) {
55+
this.loadMoreButton.disabled = isLoading
56+
this.loadAllButton.disabled = isLoading
57+
}
58+
5459
private onLoadMoreClick = () => {
60+
this.setLoading(true)
5561
this.loadPage(this.toLoadPage).then((logs) => {
5662
this.logs.mergeLogs(logs)
5763
this.renderLogs()
64+
this.setLoading(false)
5865
})
5966
}
6067

6168
private onLoadAllClick = () => {
69+
this.setLoading(true)
6270
this.loadPage(LogUpdateType.ALL).then((logs) => {
6371
this.logs.mergeLogs(logs)
6472
this.renderLogs()
73+
this.setLoading(false)
6574
})
6675
}
6776

0 commit comments

Comments
 (0)