Skip to content

Commit

Permalink
Re-render only rows on resize (#6448)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Mar 6, 2024
1 parent dc87ae6 commit 666165f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions panel/models/tabulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,14 @@ export class DataTabulatorView extends HTMLBoxView {
this.render()
}

redraw(): void {
redraw(columns: boolean = true, rows: boolean = true): void {
if (this._building) {
return
}
if (this.tabulator.columnManager.element != null) {
if (columns && (this.tabulator.columnManager.element != null)) {
this.tabulator.columnManager.redraw(true)
}
if (this.tabulator.rowManager.renderer != null) {
if (rows && (this.tabulator.rowManager.renderer != null)) {
this.tabulator.rowManager.redraw(true)
this.renderChildren()
this.setStyles()
Expand All @@ -462,7 +462,7 @@ export class DataTabulatorView extends HTMLBoxView {

override after_resize(): void {
super.after_resize()
this.redraw()
this.redraw(false, true)
}

setCSSClasses(el: HTMLDivElement): void {
Expand Down

0 comments on commit 666165f

Please sign in to comment.