File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,8 @@ class Select extends UI5Element {
380
380
let lastSelectedOptionIndex = - 1 ,
381
381
firstEnabledOptionIndex = - 1 ;
382
382
const opts = this . options . map ( ( opt , index ) => {
383
- if ( opt . selected ) {
383
+ if ( opt . selected || opt . textContent === this . value ) {
384
+ // The second condition in the IF statement is added because of Angular Reactive Forms Support(Two way data binding)
384
385
lastSelectedOptionIndex = index ;
385
386
}
386
387
if ( ! opt . disabled && ( firstEnabledOptionIndex === - 1 ) ) {
@@ -600,7 +601,7 @@ class Select extends UI5Element {
600
601
this . fireEvent ( "change" , { selectedOption } ) ;
601
602
602
603
// Angular two way data binding
603
- this . selectedItem = selectedOption ;
604
+ this . selectedItem = selectedOption . textContent ;
604
605
this . fireEvent ( "selected-item-changed" ) ;
605
606
}
606
607
You can’t perform that action at this time.
0 commit comments