Skip to content

Commit f1757d2

Browse files
author
minjk-bl
committed
Fix ttest bug on group list
1 parent 135d6df commit f1757d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

visualpython/js/m_stats/StudentstTest.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,18 @@ define([
123123
var colName = $(this).find('option:selected').text();
124124
var colDtype = $(this).find('option:selected').attr('data-type');
125125
that.state.groupingVariable = colCode;
126-
$(that.wrapSelector('#group1')).html('');
127-
$(that.wrapSelector('#group2')).html('');
128126
// get result and load column list
129127
vpKernel.getColumnCategory(that.state.data, colCode).then(function(resultObj) {
130128
let { result } = resultObj;
129+
$(that.wrapSelector('#group1')).html('');
130+
$(that.wrapSelector('#group2')).html('');
131131
try {
132132
var category = JSON.parse(result);
133133
if (category && category.length > 0 && colDtype == 'object') {
134134
// if it's categorical column and its dtype is object, check 'Text' as default
135135
category.forEach(obj => {
136136
let selected1 = obj.value === that.state.group1;
137-
let selected2 = obj.value === that.state.group1;
137+
let selected2 = obj.value === that.state.group2;
138138
$(that.wrapSelector('#group1')).append(`<option value="${obj.value}" ${selected1?'selected':''}>${obj.label}</option>`);
139139
$(that.wrapSelector('#group2')).append(`<option value="${obj.value}" ${selected2?'selected':''}>${obj.label}</option>`);
140140
});

0 commit comments

Comments
 (0)