Mooeypoo has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/399539 )
Change subject: MenuTagMultiselectWidget: Erase the input when tag is selected
if filtering
......................................................................
MenuTagMultiselectWidget: Erase the input when tag is selected if filtering
In the case where the menu filters from the input, we want to make sure
that the input is nulled out when tag is selected, so the menu item
can be visible even if it was previously filtering based on some string.
Bug: T183378
Change-Id: I3e143af1527d3c54e4aa46398dc5e36f95763699
---
M src/widgets/MenuTagMultiselectWidget.js
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/39/399539/1
diff --git a/src/widgets/MenuTagMultiselectWidget.js
b/src/widgets/MenuTagMultiselectWidget.js
index f1eaeb6..d018c82 100644
--- a/src/widgets/MenuTagMultiselectWidget.js
+++ b/src/widgets/MenuTagMultiselectWidget.js
@@ -136,6 +136,11 @@
// but in our case, we want to utilize the menu selection behavior, and
// definitely not remove the item.
+ // If there is an input that is used for filtering, erase the value so
we don't filter
+ if ( this.hasInput && this.menu.filterFromInput ) {
+ this.input.setValue( '' );
+ }
+
// Select the menu item
this.menu.selectItem( menuItem );
--
To view, visit https://gerrit.wikimedia.org/r/399539
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e143af1527d3c54e4aa46398dc5e36f95763699
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits