mw.widgets.SearchInputWidget

Search input widget.

Extends

Constructor

new mw.widgets.SearchInputWidget(config) #

Create a mw.widgets.SearchInputWidget object.

Parameters:

Name Type Attributes Description
config Object optional

Configuration options

Properties:
Name Type Attributes Default Description
performSearchOnClick boolean optional
true

If true, the script will start a search when- ever a user hits a suggestion. If false, the text of the suggestion is inserted into the text field only.

dataLocation string optional
'header'

Where the search input field will be used (header or content).

Source:

Methods

getInputElement()protected #

onLookupMenuChoose(item) #

Handle menu item 'choose' event, updating the text input value to the value of the clicked item.

TODO: Replace this with an override of onLookupMenuChoose()

Parameters:

Name Type Description
item OO.ui.MenuOptionWidget

Selected item

Overrides:
Source:
Handle menu item 'choose' event, updating the text input value to the value of the clicked item.

updateSearchIndicator() #

Update the 'clear' indicator displayed on type: 'search' text fields, hiding it when the field is already empty or when it's not editable.

Source:

Update the 'clear' indicator displayed on type: 'search' text fields, hiding it when the field is already empty or when it's not editable.