Skip to content

Commit

Permalink
Fix render on undefined error (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Mar 7, 2019
1 parent f2d0de2 commit c142a2f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/src/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ let SheetView = widgets.DOMWidgetView.extend({
switch (msg.type) {
case 'resize':
case 'after-show':
this.table_render();
this._table_constructed.then(() => {
this.hot.render();
});
break;
}
},
Expand Down Expand Up @@ -425,7 +427,7 @@ let SheetView = widgets.DOMWidgetView.extend({
colHeaders: this.model.get('column_headers'),
rowHeaders: this.model.get('row_headers')
});
this.table_render();
this.hot.render();
resolve()
})
},
Expand All @@ -434,9 +436,6 @@ let SheetView = widgets.DOMWidgetView.extend({
},
get_cell: function(row, column) {
return this.hot.getDataAtCell(row, column);
},
table_render: function() {
this.hot.render();
}
});

Expand Down

0 comments on commit c142a2f

Please sign in to comment.