core_user/comboboxsearch/user

Allow the user to search for learners.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Methods

clickHandler(e)

Source:

The handler for when a user interacts with the component.

Parameters:
Name Type Description
e MouseEvent

The triggering event that we are working with.

componentSelector() → {string}

Source:

The overall div that contains the searching widget.

Returns:
Type
string
Source:

The dropdown div that contains the searching widget result space.

Returns:
Type
string

fetchDataset() → {Promise.<*>}

Source:

Get the data we will be searching against in this component.

Returns:
Type
Promise.<*>

(async) filterDataset(filterableData) → {Array}

Source:

Dictate to the search component how and what we want to match upon.

Parameters:
Name Type Description
filterableData Array
Returns:

The users that match the given criteria.

Type
Array

(async) filterMatchDataset() → {Array}

Source:

Given we have a subset of the dataset, set the field that we matched upon to inform the end user.

Returns:

The results with the matched fields inserted.

Type
Array

getStringMap() → {Promise.<void>}

Source:

Given the set of profile fields we can possibly search, fetch their strings, so we can report to screen readers the field that matched.

Returns:
Type
Promise.<void>

keyHandler(e)

Source:

The handler for when a user presses a key within the component.

Parameters:
Name Type Description
e KeyboardEvent

The triggering event that we are working with.

(async) renderDropdown()

Source:

Build the content then replace the node.

Source:

Build up the view all link.

Source:

Build up the view all link that is dedicated to a particular result.

Parameters:
Name Type Description
userID Number

The ID of the user selected.

toggleDropdown(on)

Source:

When called, hide or show the users dropdown.

Parameters:
Name Type Default Description
on Boolean false

Flag to toggle hiding or showing values.

triggerSelector() → {string}

Source:

The triggering div that contains the searching widget.

Returns:
Type
string