Skip to content

Commit 7e8d0f1

Browse files
author
minjk-bl
committed
Edit import to set default checked state for jupyterlite seaborn
1 parent 42903cc commit 7e8d0f1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

visualpython/js/m_apps/Import.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,14 @@ define([
6969
...this.state
7070
}
7171

72+
this.importTemplatesCopy = JSON.parse(JSON.stringify(importTemplates));
73+
if (vpConfig.extensionType === 'lite') {
74+
// for LITE: set default checked state as false on seaborn package
75+
this.importTemplatesCopy['data-analysis'][3].checked = false;
76+
}
77+
7278
if (!this.state.importMeta || this.state.importMeta.length <= 0) {
73-
this.state.importMeta = JSON.parse(JSON.stringify(importTemplates[this.state.tabType]));
79+
this.state.importMeta = JSON.parse(JSON.stringify(this.importTemplatesCopy[this.state.tabType]));
7480
}
7581
}
7682

@@ -86,7 +92,7 @@ define([
8692
$(that.wrapSelector('.vp-tab-button')).removeClass('vp-tab-selected');
8793
$(this).addClass('vp-tab-selected');
8894
// replace libraries
89-
that.state.importMeta = importTemplates[tabType];
95+
that.state.importMeta = that.importTemplatesCopy[tabType];
9096
$(that.wrapSelector('#vp_tblImport')).replaceWith(function() {
9197
return that.templateTable(that.state.importMeta);
9298
});

0 commit comments

Comments
 (0)