Skip to content

Commit

Permalink
TableController.refreshBuffer() now checks of autoRefresh flag before…
Browse files Browse the repository at this point in the history
… triggering a new refresh.

Signed-off-by: Eric Le Ponner <[email protected]>
  • Loading branch information
ericleponner committed Feb 18, 2025
1 parent 6044304 commit 5461aae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/table/TableController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,10 @@ export abstract class TableController<R, K> implements PlayPauseController {
await this.bufferDidChange()
if (this.refreshCountRef.value < this.maxAutoUpdateCount) {
this.timeoutID = window.setTimeout(() => {
this.refreshCountRef.value += 1
this.refreshBuffer().catch(this.errorHandler)
if (this.autoRefresh.value) {
this.refreshCountRef.value += 1
this.refreshBuffer().catch(this.errorHandler)
}
}, this.updatePeriod)
} else {
this.stopAutoRefresh()
Expand Down

0 comments on commit 5461aae

Please sign in to comment.