Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9ba043e

Browse files
author
minjk-bl
committed
Subset condition box changed
1 parenta0e569f commit9ba043e

File tree

2 files changed

+5
-48
lines changed

2 files changed

+5
-48
lines changed

‎css/m_apps/subset.css‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@
116116
.vp-ds-rowtype-box.condition .vp-td-line {
117117
padding-bottom:5px;
118118
}
119+
.vp-ds-rowtype-box.conditiontable {
120+
width:100%;
121+
}
119122
.vp-ds-rowtype-box.conditiontabletd {
120123
padding-bottom:20px;
121124
}

‎js/m_apps/Subset.js‎

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ define([
430430
tag.appendLine('<div class="vp-icon-btn vp-del-col"></div>');
431431

432432
varvarList=this.state.dataList;
433-
tag.appendLine(this.templateForConditionVariableInput(varList,this.state.pandasObject,this.state.dataType));
434433

435434
tag.appendLine('<div class="vp-td-line">');
436435
tag.appendLine(this.templateForConditionColumnInput(colList));
@@ -1330,51 +1329,6 @@ define([
13301329
that.generateCode();
13311330
});
13321331

1333-
// typing on condition variable
1334-
$(document).on('change var_changed',this.wrapSelector('.vp-ds-cond-tbl .vp-cond-var'),function(){
1335-
varvarType=$(this).attr('data-type');
1336-
varcolTag=$(this).closest('td').find('.vp-col-list');
1337-
if(varType=='DataFrame'){
1338-
// pd Object selected
1339-
varvarName=$(this).val();
1340-
if(varName==''){
1341-
$(colTag).attr('disabled',true);
1342-
$(colTag).replaceWith(function(){
1343-
returnthat.templateForConditionColumnInput([]);
1344-
});
1345-
that.generateCode();
1346-
return;
1347-
}
1348-
// dataframe column search
1349-
varcolCode=com_util.formatString('_vp_print(_vp_get_columns_list({0}))',varName);
1350-
// get result and load column list
1351-
vpKernel.execute(colCode).then(function(resultObj){
1352-
let{ result}=resultObj;
1353-
varcolList=JSON.parse(result);
1354-
colList=colList.map(function(x){
1355-
return{
1356-
...x,
1357-
value:x.label,
1358-
code:x.value
1359-
};
1360-
});
1361-
$(colTag).replaceWith(function(){
1362-
returnthat.templateForConditionColumnInput(colList);
1363-
});
1364-
$(colTag).attr('disabled',false);
1365-
that.generateCode();
1366-
});
1367-
}else{
1368-
$(colTag).val('');
1369-
$(colTag).attr('placeholder','');
1370-
$(colTag).attr('disabled',true);
1371-
$(colTag).replaceWith(function(){
1372-
returnthat.templateForConditionColumnInput([]);
1373-
});
1374-
that.generateCode();
1375-
}
1376-
});
1377-
13781332
$(document).on('change',this.wrapSelector('.vp-ds-cond-tbl .vp-col-list'),function(){
13791333
varthisTag=$(this);
13801334
varvarName=$(this).closest('td').find('.vp-cond-var').val();
@@ -1492,8 +1446,8 @@ define([
14921446
varuseCondition=false;
14931447
for(vari=0;i<condList.length;i++){
14941448
varcolTag=$(condList[i]);
1495-
varvarName=colTag.find('.vp-cond-var').val();
1496-
varvarType=colTag.find('.vp-cond-var').data('type');
1449+
varvarName=this.state.pandasObject;
1450+
varvarType=this.state.dataType;
14971451
varcolName=colTag.find('.vp-col-list').find('option:selected').data('code');
14981452
colName=colName ?colName :'';
14991453
varoper=colTag.find('.vp-oper-list').val();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp