Skip to content

Commit

Permalink
Fix widgets style (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Mar 6, 2019
1 parent 3abc26f commit 76dfc7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions js/src/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
width: auto !important;
height: auto !important;
}

.handsontable .jupyter-widgets {
width: 100%;
height: 100%;
}
6 changes: 1 addition & 5 deletions js/src/widget_cell_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ async function widgetRenderer(instance, td, row, col, prop, value, cellPropertie
// clean up leftover text or elements from previous renderings
td.innerHTML = '';
if(el) {
// setting with and height to 100% makes the widget look ok in the table, but we may want to
/// have a better method
el.style.width = '100%';
el.style.height = '100%';
td.appendChild(el);
cellProperties.widget_view.trigger('displayed')
cellProperties.widget_view.trigger('displayed');
}
}

Expand Down

0 comments on commit 76dfc7f

Please sign in to comment.