|
@@ -43,8 +43,9 @@ const csvHandlerExtension: JupyterLabPlugin<void> = {
|
|
* Activate the table widget extension.
|
|
* Activate the table widget extension.
|
|
*/
|
|
*/
|
|
function activateCSVWidget(app: JupyterLab, registry: IDocumentRegistry, state: IStateDB): void {
|
|
function activateCSVWidget(app: JupyterLab, registry: IDocumentRegistry, state: IStateDB): void {
|
|
|
|
+ const factoryName = 'Table';
|
|
const factory = new CSVWidgetFactory({
|
|
const factory = new CSVWidgetFactory({
|
|
- name: 'Table',
|
|
|
|
|
|
+ name: factoryName,
|
|
fileExtensions: ['.csv'],
|
|
fileExtensions: ['.csv'],
|
|
defaultFor: ['.csv']
|
|
defaultFor: ['.csv']
|
|
});
|
|
});
|
|
@@ -52,7 +53,7 @@ function activateCSVWidget(app: JupyterLab, registry: IDocumentRegistry, state:
|
|
restore: {
|
|
restore: {
|
|
state,
|
|
state,
|
|
command: 'file-operations:open',
|
|
command: 'file-operations:open',
|
|
- args: widget => ({ path: widget.context.path }),
|
|
|
|
|
|
+ args: widget => ({ path: widget.context.path, factory: factoryName }),
|
|
name: widget => widget.context.path,
|
|
name: widget => widget.context.path,
|
|
namespace: 'csvwidgets',
|
|
namespace: 'csvwidgets',
|
|
when: app.started,
|
|
when: app.started,
|