Class: OptionsSearch

Drupal.viewsUi.OptionsSearch($form)

new OptionsSearch($form)

Constructor for the viewsUi.OptionsSearch object.

The OptionsSearch object filters the available options on a form according to the user's search term. Typing in "taxonomy" will show only those options containing "taxonomy" in their label.

Parameters:
Name Type Description
$form jQuery

The form element.

Source:

Members

$form :jQuery

Type:
Source:

options

Get a list of option labels and their corresponding divs and maintain it in memory, so we have as little overhead as possible at keyup time.

Source:

Methods

getOptions($allOptions) → {Array}

Assemble a list of all the filterable options on the form.

Parameters:
Name Type Description
$allOptions jQuery

A jQuery object representing the rows of filterable options to be shown and hidden depending on the user's search terms.

Source:
Returns:

An array of all the filterable options.

Type
Array

handleFilter(event)

Filter handler for the search box and type select that hides or shows the relevant options.

Parameters:
Name Type Description
event jQuery.Event

The formUpdated event.

Source: