jenkins-bot has submitted this change and it was merged.

Change subject: Recompute ComboBox selection when adding/removing items
......................................................................


Recompute ComboBox selection when adding/removing items

So you don't need a dummy call to onInputChange() to get
this to happen.

Change-Id: Idcbf38c5329cb63f06f5da0a83b1503b5db6ac13
---
M src/widgets/ComboBoxWidget.js
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/widgets/ComboBoxWidget.js b/src/widgets/ComboBoxWidget.js
index a064187..d021535 100644
--- a/src/widgets/ComboBoxWidget.js
+++ b/src/widgets/ComboBoxWidget.js
@@ -105,6 +105,8 @@
  * Handle menu item change events.
  */
 OO.ui.ComboBoxWidget.prototype.onMenuItemsChange = function () {
+       var match = this.menu.getItemFromData( this.input.getValue() );
+       this.menu.selectItem( match );
        this.$element.toggleClass( 'oo-ui-comboBoxWidget-empty', 
this.menu.isEmpty() );
 };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/170781
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcbf38c5329cb63f06f5da0a83b1503b5db6ac13
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to