Skip to content

Commit

Permalink
ensure hoz vdom vis row cache is reset on data refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Mar 10, 2022
1 parent 831c2e2 commit 37ece1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -18886,9 +18886,12 @@ class VirtualDomHorizontal extends Renderer{
}

vertScrollListen(){
this.subscribe("scroll-vertical", () => {
this.visibleRows = null;
});
this.subscribe("scroll-vertical", this.clearVisRowCache.bind(this));
this.subscribe("data-refreshed", this.clearVisRowCache.bind(this));
}

clearVisRowCache(){
this.visibleRows = null;
}

//////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.js.map

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions src/js/core/rendering/renderers/VirtualDomHorizontal.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ export default class VirtualDomHorizontal extends Renderer{
}

vertScrollListen(){
this.subscribe("scroll-vertical", () => {
this.visibleRows = null;
})
this.subscribe("scroll-vertical", this.clearVisRowCache.bind(this));
this.subscribe("data-refreshed", this.clearVisRowCache.bind(this));
}

clearVisRowCache(){
this.visibleRows = null;
}

//////////////////////////////////////
Expand Down

0 comments on commit 37ece1b

Please sign in to comment.