Extends
Constructor
new mw.widgets.UserInputWidget([config])
#
Create a mw.widgets.UserInputWidget object.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
- Mixes in:
- Source:
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
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>
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 |
setLookupsDisabled([disabled])
#
Disable or re-enable lookups, but does not apply the re-enabling of lookups if this.alwaysDisableLookups is set to true.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
disabled |
boolean |
optional |
false | Disable lookups |
Disable or re-enable lookups, but does not apply the re-enabling of lookups if this.alwaysDisableLookups is set to true.