Skip to content

Commit 41e0915

Browse files
committed
Improve types
1 parent d5f0051 commit 41e0915

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

packages/nteract-data-explorer-extension/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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

packages/nteract-data-explorer-extension/src/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
44
import { JSONObject } from '@lumino/coreutils';
55
import { Message } from '@lumino/messaging';
66
import { 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,

0 commit comments

Comments
 (0)