@@ -159,12 +159,10 @@ export class PickerField extends TextField implements TemplatedItemsView {
159
159
if ( selectedIndex !== undefined ) {
160
160
let object = this . getDataItem ( selectedIndex ) ;
161
161
this . selectedIndex = selectedIndex ;
162
- let value = this . getValueFromField ( "valueField " , this . valueField , object ) ;
162
+ let value = this . getValueFromField ( "selectedValue " , this . valueField , object ) ;
163
163
this . selectedValue = value === undefined ? object : value ;
164
164
165
- let textValue = this . getValueFromField ( "textField" , this . textField , object ) ;
166
- textValue = textValue === undefined ? object : textValue ;
167
- this . text = textValue ;
165
+ this . updatePickerText ( object ) ;
168
166
}
169
167
170
168
this . disposeModalView ( ) ;
@@ -415,9 +413,17 @@ export class PickerField extends TextField implements TemplatedItemsView {
415
413
}
416
414
}
417
415
416
+ private updatePickerText ( object : any ) {
417
+ let textValue = this . getValueFromField ( "text" , this . textField , object ) ;
418
+ textValue = textValue === undefined ? object : textValue ;
419
+ this . text = textValue ;
420
+ }
421
+
418
422
protected onModalAnimatedChanged ( oldValue : boolean , newValue : boolean ) { }
419
423
420
- protected onSelectedValueChanged ( oldValue : any , newValue : any ) { }
424
+ protected onSelectedValueChanged ( oldValue : any , newValue : any ) {
425
+ this . text = newValue ;
426
+ }
421
427
422
428
protected onValueFieldChanged ( oldValue : string , newValue : string ) { }
423
429
0 commit comments