Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions trame_client/ui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,14 @@ def _ipython_display_(self):
display(self.ipywidget)
except ImportError:
display_html(self._jupyter_content(), raw=True)

async def display_cell(self, *, height=None, width=None):
from IPython.display import clear_output

height = height or "100%"
width = width or "100%"

self.iframe_style = f"border: none; width: {width}{css_unit(width)}; height: {height}{css_unit(height)};"
await self.ready
clear_output(wait=True)
self._ipython_display_()
Loading