new mw.widgets.UserInputWidget(configopt)
#
Creates a mw.widgets.UserInputWidget object.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
<optional> |
Configuration options Properties
|
- Mixes In:
- Source:
Creates a mw.widgets.UserInputWidget object.
Extends
Methods
focus()
#
getLookupCacheDataFromResponse(response) → {Object}
#
Get lookup cache item from server response data.
Parameters:
Name | Type | Description |
---|---|---|
response |
any | Response from server |
Returns:
- Type
- Object
Get lookup cache item from server response data.
getLookupMenuOptionsFromData(data) → {Array.<OO.ui.MenuOptionWidget>}
#
Get list of menu items from a server response.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | Query result |
Returns:
Menu items
- Type
- Array.<OO.ui.MenuOptionWidget>
Get list of menu items from a server response.
getLookupRequest()
#
onLookupMenuChoose(item)
#
Handle menu item 'choose' event, updating the text input value to the value of the clicked item.
Parameters:
Name | Type | Description |
---|---|---|
item |
OO.ui.MenuOptionWidget | Selected item |
Handle menu item 'choose' event, updating the text input value to the value of the clicked item.