Class: CategoryLookupInputWidget

CategoryLookupInputWidget(options)

new CategoryLookupInputWidget(options)

Parameters:
Name Type Description
options Object

Configuration options

Properties
Name Type Description
gateway CategoryGateway

to use to retrieve search results

suggestions jQuery.Object

container element for search suggestions

saveButton jQuery.Object

element. Will get disabled when suggested item clicked.

Source:

Extends

  • OO.ui.mixin.LookupElement

Methods

getLookupCacheDataFromResponse(response) → {Mixed}

Get lookup cache item from server response data.

Parameters:
Name Type Description
response Mixed

Response from server

Source:
Returns:

Cached result response

Type
Mixed

getLookupMenuOptionsFromData(data) → {Array}

Get a list of menu item widgets from the data stored by the lookup request's done handler.

Parameters:
Name Type Description
data Mixed

Cached result data, usually an array

Source:
Returns:

Array of OO.ui.MenuOptionWidget

Type
Array

getLookupRequest() → {jQuery.Deferred}

Returns the result of the search request.

Source:
Returns:
Type
jQuery.Deferred

onLookupMenuItemChoose(data)

Handle a click on a suggested item. Add it to the list of added categories and show save button.

Parameters:
Name Type Description
data Object

Data of the clicked element

Source: