module:core_user/local/participantsfilter/filter

module:core_user/local/participantsfilter/filter

new (require("core_user/local/participantsfilter/filter"))(filterType, rootNode, initialValues)

Source:

Constructor for a new filter.

Parameters:
Name Type Description
filterType String

The type of filter that this relates to

rootNode HTMLElement

The root node for the participants filterset

initialValues Array

The initial values for the selector

Members

filterRoot

Source:

Get the root node for this filter.

filterValue

Source:

Get the composed value for this filter.

jointype

Source:

Get the type of join specified.

name

Source:

Get the name of this filter.

placeholder

Source:

Get the placeholder to use when showing the value selector.

rawValues

Source:

Get the list of raw values for this filter type.

showSuggestions

Source:

Whether to show suggestions in the autocomplete.

values

Source:

Get the list of values for this filter type.

Methods

(async) addValueSelector(initialValues)

Source:

Add the value selector to the filter row.

Parameters:
Name Type Description
initialValues Array

getFilterValueNode() → {HTMLElement}

Source:

Get the HTMLElement which contains the value selector.

Returns:
Type
HTMLElement

getSourceDataForFilter() → {Array}

Source:

Get the possible data for this filter type.

Returns:
Type
Array

tearDown()

Source:

Perform any tear-down for this filter type.

(inner) getOptionsForSelect(select) → {Array.<HTMLOptionElement>}

Source:

Fetch all checked options in the select.

This is a poor-man's polyfill for select.selectedOptions, which is not available in IE11.

Parameters:
Name Type Description
select HTMLSelectElement
Returns:

All selected options

Type
Array.<HTMLOptionElement>