File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ export class OutputWidget extends Widget {
4141 _render ( ) {
4242 const { data, schema } = this . _data . get ( this . _mimeType ) ;
4343 // const metadata = this._metadata.get(this._mimeType);
44- // if (data)
4544 ReactDOM . render ( < JSONTable data = { data } schema = { schema } /> , this . node ) ;
45+ // Inject static HTML into mime bundle
4646 this . _data . set (
4747 'text/html' ,
4848 ReactDOMServer . renderToStaticMarkup ( < JSONTable data = { data } schema = { schema } /> )
Original file line number Diff line number Diff line change @@ -32,9 +32,8 @@ export function register_renderer(notebook) {
3232 render ( json , toinsert [ 0 ] ) ;
3333 // Inject static HTML into mime bundle
3434 this . outputs . filter ( output => output . data [ MIME_TYPE ] ) . forEach ( output => {
35- const { resources : [ props ] } = json ;
3635 ReactDOMServer . renderToStaticMarkup (
37- < JSONTable { ... props } />
36+ < JSONTable data = { data } schema = { schema } />
3837 )
3938 } ) ;
4039 element . append ( toinsert ) ;
@@ -65,9 +64,9 @@ export function render_cells(notebook) {
6564 notebook . get_cells ( ) . forEach ( cell => {
6665 // If a cell has output data of 'application/vnd.dataresource+json' mime type
6766 if (
68- cell . output_area &&
69- cell . output_area . outputs . find ( output =>
70- output . data && output . data [ MIME_TYPE ]
67+ cell . output_area &&
68+ cell . output_area . outputs . find (
69+ output => output . data && output . data [ MIME_TYPE ]
7170 )
7271 ) {
7372 // Re-render the cell by executing it
You can’t perform that action at this time.
0 commit comments