File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ class Select extends UI5Element {
391
391
this . _selectedIndex = nextIndex === - 1 ? this . _selectedIndex : nextIndex ;
392
392
393
393
if ( shouldFireEvent ) {
394
- this . fireEvent ( "change" , { selectedOption : this . options [ nextIndex ] } ) ;
394
+ this . _fireChangeEvent ( this . options [ nextIndex ] ) ;
395
395
}
396
396
}
397
397
@@ -424,11 +424,19 @@ class Select extends UI5Element {
424
424
this . _select ( this . _selectedIndexBeforeOpen ) ;
425
425
this . _escapePressed = false ;
426
426
} else if ( this . _lastSelectedOption !== this . options [ this . _selectedIndex ] ) {
427
- this . fireEvent ( "change" , { selectedOption : this . options [ this . _selectedIndex ] } ) ;
427
+ this . _fireChangeEvent ( this . options [ this . _selectedIndex ] ) ;
428
428
this . _lastSelectedOption = this . options [ this . _selectedIndex ] ;
429
429
}
430
430
}
431
431
432
+ _fireChangeEvent ( selectedOption ) {
433
+ this . fireEvent ( "change" , { selectedOption } ) ;
434
+
435
+ // Angular two way data binding
436
+ this . selectedItem = selectedOption ;
437
+ this . fireEvent ( "selected-item-changed" ) ;
438
+ }
439
+
432
440
get valueStateTextMappings ( ) {
433
441
const i18nBundle = this . i18nBundle ;
434
442
You can’t perform that action at this time.
0 commit comments