new (require("core_group/comboboxsearch/group"))(cmid)
- Description:
Construct the class.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
cmid |
int | null |
null
|
ID of the course module initiating the group search (optional). |
Methods
changeHandler(e)
- Description:
The handler for when a user changes the value of the component (selects an option from the dropdown).
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event | The change event. |
(async) clickHandler(e)
- Description:
The handler for when a user interacts with the component.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
MouseEvent | The triggering event that we are working with. |
componentSelector() → {string}
- Description:
The overall div that contains the searching widget.
- Source:
Returns:
- Type
- string
dropdownSelector() → {string}
- Description:
The dropdown div that contains the searching widget result space.
- Source:
Returns:
- Type
- string
(async) fetchDataset() → {Promise.<*>}
- Description:
Get the data we will be searching against in this component.
- Source:
Returns:
- Type
- Promise.<*>
(async) filterDataset(filterableData) → {Array}
- Description:
Dictate to the search component how and what we want to match upon.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
filterableData |
Array |
Returns:
The users that match the given criteria.
- Type
- Array
filterMatchDataset()
- Description:
Given we have a subset of the dataset, set the field that we matched upon to inform the end user.
- Source:
registerInputHandlers()
- Description:
Override the input event listener for the text input area.
- Source:
(async) renderDefault()
- Description:
Build the content then replace the node by default we want our form to exist.
- Source:
(async) renderDropdown()
- Description:
Build the content then replace the node.
- Source:
selectOneLink(groupID)
- Description:
Build up the view all link that is dedicated to a particular result. We will call this function when a user interacts with the combobox to redirect them to show their results in the page.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
groupID |
Number | The ID of the group selected. |