File tree 4 files changed +12
-11
lines changed
4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -186,14 +186,15 @@ define([
186
186
that . state . dataType = ui . item . dtype ;
187
187
that . state . returnDataType = ui . item . dtype ;
188
188
189
+ that . prop . pageThis . state [ that . prop . id ] = ui . item . value ;
189
190
that . prop . pageThis . state [ that . prop . id + '_state' ] = that . state ;
190
191
191
- $ ( this ) . trigger ( 'change' ) ;
192
-
193
192
// select event
194
193
if ( that . prop . select && typeof that . prop . select == 'function' ) {
195
194
result = that . prop . select ( ui . item . value , ui . item . dtype ) ;
196
195
}
196
+ $ ( this ) . trigger ( 'change' ) ;
197
+
197
198
if ( result != undefined ) {
198
199
return result ;
199
200
}
Original file line number Diff line number Diff line change @@ -143,10 +143,11 @@ define([
143
143
let result = true ;
144
144
// trigger change
145
145
$ ( this ) . val ( ui . item . value ) ;
146
- $ ( this ) . trigger ( 'change' ) ;
147
146
148
- if ( typeof that . _selectEvent == "function" )
147
+ if ( typeof that . _selectEvent == "function" ) {
149
148
result = that . _selectEvent ( ui . item . value , ui . item ) ;
149
+ }
150
+ $ ( this ) . trigger ( 'change' ) ;
150
151
if ( result != undefined ) {
151
152
return result ;
152
153
}
Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ define([
259
259
pageThis : this ,
260
260
id : 'data' ,
261
261
select : function ( value , dtype ) {
262
+ that . state . data = value ;
262
263
that . state . dtype = dtype ;
263
264
264
265
if ( dtype == 'DataFrame' ) {
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ define([
76
76
// use file
77
77
$ ( this . wrapSelector ( '#useFile' ) ) . on ( 'change' , function ( ) {
78
78
let checked = $ ( this ) . prop ( 'checked' ) ;
79
- if ( checked ) {
79
+ if ( checked === true ) {
80
80
$ ( that . wrapSelector ( '.vp-wc-file-option' ) ) . show ( ) ;
81
81
} else {
82
82
$ ( that . wrapSelector ( '.vp-wc-file-option' ) ) . hide ( ) ;
@@ -174,16 +174,14 @@ define([
174
174
pageThis : this ,
175
175
id : 'data' ,
176
176
select : function ( ) {
177
- // that.state.useFile = false;
177
+ that . state . useFile = false ;
178
178
$ ( 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 ( ) ;
181
180
} ,
182
181
finish : function ( ) {
183
- // that.state.useFile = false;
182
+ that . state . useFile = false ;
184
183
$ ( 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 ( ) ;
187
185
}
188
186
} ) ;
189
187
$ ( this . wrapSelector ( '#data' ) ) . replaceWith ( dataSelector . toTagString ( ) ) ;
You can’t perform that action at this time.
0 commit comments