Skip to content

Commit

Permalink
Merge pull request #81 from martinRenou/fix_table_style
Browse files Browse the repository at this point in the history
Fix table style when the kernel is disconnected
  • Loading branch information
martinRenou committed Mar 12, 2019
2 parents 44d5333 + 5921791 commit 267ec40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/src/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ let SheetView = widgets.DOMWidgetView.extend({
render: function() {
// this.widget_view_promises = {}
this.widget_views = {}
this.table_container = document.createElement('div');
this.el.appendChild(this.table_container);
// promise used for unittesting
this._table_constructed = this.displayed.then(async () => {
this.hot = await this._build_table();
Expand Down Expand Up @@ -327,7 +329,7 @@ let SheetView = widgets.DOMWidgetView.extend({
},
async _build_table() {
await this._build_widgets_views()
return new Handsontable(this.el, extend({
return new Handsontable(this.table_container, extend({
data: this._get_cell_data(),
rowHeaders: true,
colHeaders: true,
Expand Down

0 comments on commit 267ec40

Please sign in to comment.