File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -123,18 +123,18 @@ define([
123
123
var colName = $ ( this ) . find ( 'option:selected' ) . text ( ) ;
124
124
var colDtype = $ ( this ) . find ( 'option:selected' ) . attr ( 'data-type' ) ;
125
125
that . state . groupingVariable = colCode ;
126
- $ ( that . wrapSelector ( '#group1' ) ) . html ( '' ) ;
127
- $ ( that . wrapSelector ( '#group2' ) ) . html ( '' ) ;
128
126
// get result and load column list
129
127
vpKernel . getColumnCategory ( that . state . data , colCode ) . then ( function ( resultObj ) {
130
128
let { result } = resultObj ;
129
+ $ ( that . wrapSelector ( '#group1' ) ) . html ( '' ) ;
130
+ $ ( that . wrapSelector ( '#group2' ) ) . html ( '' ) ;
131
131
try {
132
132
var category = JSON . parse ( result ) ;
133
133
if ( category && category . length > 0 && colDtype == 'object' ) {
134
134
// if it's categorical column and its dtype is object, check 'Text' as default
135
135
category . forEach ( obj => {
136
136
let selected1 = obj . value === that . state . group1 ;
137
- let selected2 = obj . value === that . state . group1 ;
137
+ let selected2 = obj . value === that . state . group2 ;
138
138
$ ( that . wrapSelector ( '#group1' ) ) . append ( `<option value="${ obj . value } " ${ selected1 ?'selected' :'' } >${ obj . label } </option>` ) ;
139
139
$ ( that . wrapSelector ( '#group2' ) ) . append ( `<option value="${ obj . value } " ${ selected2 ?'selected' :'' } >${ obj . label } </option>` ) ;
140
140
} ) ;
You can’t perform that action at this time.
0 commit comments