Skip to content

Commit

Permalink
Ensure Tabulator row content expand button works with frozen columns (#…
Browse files Browse the repository at this point in the history
…2837)

* Ensure Tabulator row content expand button works with frozen columns

* Fix code formatting
  • Loading branch information
philippjfr authored Oct 19, 2021
1 parent 44a40a7 commit 277a7a9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions panel/models/tabulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ export class DataTabulatorView extends PanelHTMLBoxView {
return
const style = getComputedStyle(this.tabulator.element.children[1].children[0])
const bg = style.backgroundColor
const row_view = div({style: "height: 100%; width: 100%; background-color: " + bg})
const neg_margin = "-" + rowEl.style.paddingLeft
const row_view = div({style: "background-color: " + bg +"; margin-left:" + neg_margin})
view.renderTo(row_view)
row.getElement().appendChild(row_view)
}
Expand Down Expand Up @@ -389,10 +390,11 @@ export class DataTabulatorView extends PanelHTMLBoxView {
columns.push({...column, columns: group_columns})
} else if (column.formatter === "expand") {
const expand = {
align: "center",
hozAlign: "center",
cellClick: (_: any, cell: any) => { this._update_expand(cell) },
formatter: (cell: any) => { return this._expand_render(cell) },
width:40
width:40,
frozen: true
}
columns.push(expand)
} else {
Expand Down

0 comments on commit 277a7a9

Please sign in to comment.