File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
packages/nteract-data-explorer-extension Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 11# nteract-data-explorer-extension
22
3- A JupyterLab extension for rendering tabular-data-resource files based on [ nteract Data Explorer] ( https://github.com/nteract/data-explorer ) .
3+ A JupyterLab extension for rendering data of tabular-data-resource type based on [ nteract Data Explorer] ( https://github.com/nteract/data-explorer ) .
44
5- ![ demo] ( http://g.recordit.co/SsWJCpKIJy .gif )
5+ ![ demo] ( http://g.recordit.co/RkMsk43K30 .gif )
66
77## Prerequisites
88
9- - JupyterLab >=1.1.1
9+ - JupyterLab >= 1.1.1
1010
1111## Install
1212
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
44import { JSONObject } from '@lumino/coreutils' ;
55import { Message } from '@lumino/messaging' ;
66import { Widget } from '@lumino/widgets' ;
7- import DataExplorer from '@nteract/data-explorer' ;
7+ import DataExplorer , { Props } from '@nteract/data-explorer' ;
88
99/**
1010 * The class name added to the extension.
@@ -94,10 +94,14 @@ export class DataExplorerWidget extends Widget
9494
9595 clearInterval ( timer ) ;
9696 ReactDOM . render (
97- // @ts -ignore
9897 < DataExplorer
99- data = { data }
100- metadata = { model . metadata . dataExplorer || { } }
98+ data = { ( data as unknown ) as Props [ 'data' ] }
99+ metadata = {
100+ ( ( model . metadata . dataExplorer as unknown ) as Props [ 'metadata' ] ) ||
101+ { }
102+ }
103+ mediaType = { MIME_TYPE }
104+ initialView = { 'grid' }
101105 onMetadataChange = { onMetadataChange }
102106 /> ,
103107 this . node ,
You can’t perform that action at this time.
0 commit comments