@@ -93,6 +93,7 @@ let nextUniqueId = 0;
93
93
class="mdc-select__native-control"
94
94
[attr.aria-describedby]="_ariaDescribedby || null"
95
95
[required]="required"
96
+ [value]="value"
96
97
(mousedown)="onInteraction($event)"
97
98
(touchstart)="onInteraction($event)"
98
99
(blur)="onBlur()"
@@ -200,7 +201,7 @@ export class MdcSelect extends _MdcSelectMixinBase implements AfterViewInit, DoC
200
201
@Input ( )
201
202
get value ( ) : any { return this . _value ; }
202
203
set value ( newValue : any ) {
203
- this . setSelectionByValue ( newValue ) ;
204
+ this . setSelectionByValue ( newValue , true ) ;
204
205
}
205
206
private _value : any ;
206
207
@@ -411,7 +412,7 @@ export class MdcSelect extends _MdcSelectMixinBase implements AfterViewInit, DoC
411
412
}
412
413
413
414
writeValue ( value : any ) : void {
414
- this . setSelectionByValue ( value , false ) ;
415
+ this . setSelectionByValue ( value ) ;
415
416
}
416
417
417
418
registerOnChange ( fn : ( value : any ) => void ) : void {
@@ -456,7 +457,7 @@ export class MdcSelect extends _MdcSelectMixinBase implements AfterViewInit, DoC
456
457
* Sets the selected option based on a value. If no option can be
457
458
* found with the designated value, the select trigger is cleared.
458
459
*/
459
- setSelectionByValue ( value : any , isUserInput : boolean = true ) : void {
460
+ setSelectionByValue ( value : any , isUserInput ? : boolean ) : void {
460
461
if ( ! this . _foundation ) { return ; }
461
462
462
463
const newValue = value || null ;
0 commit comments