Skip to content

Commit 3a63428

Browse files
authored
Merge pull request #104 from minjk-bl/devops
Frame - reset table
2 parents c2974b7 + 128f3a3 commit 3a63428

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/common/vpFrameEditor.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,8 +1196,12 @@ define([
11961196
this.loading = true;
11971197
kernelApi.executePython(code.toString(), function(result) {
11981198
try {
1199+
if (!result || result.length <= 0) {
1200+
return;
1201+
}
1202+
var data = JSON.parse(result.substr(1,result.length - 2).replaceAll('\\\\', '\\'));
1203+
11991204
kernelApi.getColumnList(tempObj, function(columnResult) {
1200-
var data = JSON.parse(result.substr(1,result.length - 2).replaceAll('\\\\', '\\'));
12011205

12021206
var columnList = JSON.parse(columnResult);
12031207
// var columnList = data.columns;
@@ -1430,6 +1434,11 @@ define([
14301434
that.state.tempObj = '_vp';
14311435
that.initState();
14321436

1437+
// reset table
1438+
$(that.wrapSelector('.' + VP_FE_TABLE)).replaceWith(function() {
1439+
return that.renderTable('');
1440+
});
1441+
14331442
// load code with temporary df
14341443
that.loadCode(that.getTypeCode(FRAME_EDIT_TYPE.INIT));
14351444
that.loadInfo();

0 commit comments

Comments
 (0)