File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } ) ;
You can’t perform that action at this time.
0 commit comments