File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,14 +186,15 @@ define([
186186 that . state . dataType = ui . item . dtype ;
187187 that . state . returnDataType = ui . item . dtype ;
188188
189+ that . prop . pageThis . state [ that . prop . id ] = ui . item . value ;
189190 that . prop . pageThis . state [ that . prop . id + '_state' ] = that . state ;
190191
191- $ ( this ) . trigger ( 'change' ) ;
192-
193192 // select event
194193 if ( that . prop . select && typeof that . prop . select == 'function' ) {
195194 result = that . prop . select ( ui . item . value , ui . item . dtype ) ;
196195 }
196+ $ ( this ) . trigger ( 'change' ) ;
197+
197198 if ( result != undefined ) {
198199 return result ;
199200 }
Original file line number Diff line number Diff line change @@ -143,10 +143,11 @@ define([
143143 let result = true ;
144144 // trigger change
145145 $ ( this ) . val ( ui . item . value ) ;
146- $ ( this ) . trigger ( 'change' ) ;
147146
148- if ( typeof that . _selectEvent == "function" )
147+ if ( typeof that . _selectEvent == "function" ) {
149148 result = that . _selectEvent ( ui . item . value , ui . item ) ;
149+ }
150+ $ ( this ) . trigger ( 'change' ) ;
150151 if ( result != undefined ) {
151152 return result ;
152153 }
Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ define([
259259 pageThis : this ,
260260 id : 'data' ,
261261 select : function ( value , dtype ) {
262+ that . state . data = value ;
262263 that . state . dtype = dtype ;
263264
264265 if ( dtype == 'DataFrame' ) {
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ define([
7676 // use file
7777 $ ( this . wrapSelector ( '#useFile' ) ) . on ( 'change' , function ( ) {
7878 let checked = $ ( this ) . prop ( 'checked' ) ;
79- if ( checked ) {
79+ if ( checked === true ) {
8080 $ ( that . wrapSelector ( '.vp-wc-file-option' ) ) . show ( ) ;
8181 } else {
8282 $ ( that . wrapSelector ( '.vp-wc-file-option' ) ) . hide ( ) ;
@@ -174,16 +174,14 @@ define([
174174 pageThis : this ,
175175 id : 'data' ,
176176 select : function ( ) {
177- // that.state.useFile = false;
177+ that . state . useFile = false ;
178178 $ ( that . wrapSelector ( '#useFile' ) ) . prop ( 'checked' , false ) ;
179- $ ( that . wrapSelector ( '#useFile' ) ) . trigger ( 'change' ) ;
180- // $(that.wrapSelector('.vp-wc-file-option')).hide();
179+ $ ( that . wrapSelector ( '.vp-wc-file-option' ) ) . hide ( ) ;
181180 } ,
182181 finish : function ( ) {
183- // that.state.useFile = false;
182+ that . state . useFile = false ;
184183 $ ( that . wrapSelector ( '#useFile' ) ) . prop ( 'checked' , false ) ;
185- $ ( that . wrapSelector ( '#useFile' ) ) . trigger ( 'change' ) ;
186- // $(that.wrapSelector('.vp-wc-file-option')).hide();
184+ $ ( that . wrapSelector ( '.vp-wc-file-option' ) ) . hide ( ) ;
187185 }
188186 } ) ;
189187 $ ( this . wrapSelector ( '#data' ) ) . replaceWith ( dataSelector . toTagString ( ) ) ;
You can’t perform that action at this time.
0 commit comments