File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ class ComboBox extends Picker {
165
165
*/
166
166
afterSetStore ( value , oldValue ) {
167
167
let me = this ,
168
- filters ;
168
+ filters , val ;
169
169
170
170
if ( value ) {
171
171
if ( me . useFilter ) {
@@ -185,7 +185,14 @@ class ComboBox extends Picker {
185
185
me . list . store = value
186
186
}
187
187
188
- value . on ( 'load' , me . onStoreLoad , me )
188
+ value . on ( 'load' , me . onStoreLoad , me ) ;
189
+
190
+ if ( me . value ) {
191
+ val = me . value ;
192
+
193
+ me . _value = null ; // silent reset to trigger a change event
194
+ me . value = val
195
+ }
189
196
}
190
197
}
191
198
@@ -248,6 +255,11 @@ class ComboBox extends Picker {
248
255
let me = this ,
249
256
{ displayField, valueField} = me ;
250
257
258
+ // Do not create a default store instance, in case there is a bound store to be created
259
+ if ( ! value && me . bind ?. store ) {
260
+ return null
261
+ }
262
+
251
263
oldValue ?. destroy ( ) ;
252
264
253
265
// Promote an array of items to be a Store
@@ -312,6 +324,10 @@ class ComboBox extends Picker {
312
324
return null
313
325
}
314
326
327
+ if ( ! store ) { // We will (re)set the value once the store is created
328
+ return value
329
+ }
330
+
315
331
// we can only match record ids or display values in case the store is loaded
316
332
if ( store . getCount ( ) > 0 ) {
317
333
record = store . isFiltered ( ) ? store . allItems . get ( value ) : store . get ( value ) ;
You can’t perform that action at this time.
0 commit comments