Allow the user to show and hide columns of the report at will.
- Source:
- Copyright:
- 2023 Mathew May
- 2023 Mathew May
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Methods
clickHandler(e)
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}
The overall div that contains the searching widget.
Returns:
- Type
- string
countUpdate()
Update the visual count of collapsed columns or hide the count all together.
(async) docClickHandler(e) → {Promise.<void>}
Externally defined click function to improve memory handling.
Parameters:
Name | Type | Description |
---|---|---|
e |
MouseEvent |
Returns:
- Type
- Promise.<void>
dropdownSelector() → {string}
The dropdown div that contains the searching widget result space.
Returns:
- Type
- string
fetchCustomFieldValues() → {array.<string, *>}
If we have any custom user profile fields, grab their system & readable names to add to our string map.
Returns:
An array of associated string arrays ready for our map.
- Type
- array.<string, *>
fetchDataset() → {string}
Get the data we will be searching against in this component.
Returns:
- Type
- string
fetchRequiredGradeStrings() → {Promise.<void>}
Given the set of gradable items we can possibly search, fetch their strings, so we can report to screen readers the field that matched.
Returns:
- Type
- Promise.<void>
fetchRequiredUserStrings() → {Promise.<void>}
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>
(async) filterDataset(filterableData) → {Array}
Dictate to the search component how and what we want to match upon.
Parameters:
Name | Type | Description |
---|---|---|
filterableData |
Array |
Returns:
An array of objects containing the system reference and the user readable value.
- Type
- Array
filterMatchDataset()
Given we have a subset of the dataset, set the field that we matched upon to inform the end user.
getDataset() → {Array}
Return the dataset that we will be searching upon.
Returns:
- Type
- Array
(async) keyHandler(e)
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) prefcountpipe() → {Promise.<void>}
Update the user preferences, count display then render the results.
Returns:
- Type
- Promise.<void>
registerClickHandlers()
Register clickable event listeners.
registerFormEvents()
Handle the form submission within the dropdown.
registerInputEvents()
Handle any keyboard inputs.
(async) renderDefault()
Build the content then replace the node by default we want our form to exist.
(async) renderDropdown()
Build the content then replace the node.
setPreferences()
Given a user performs an action, update the users' preferences.
triggerSelector() → {string}
The triggering div that contains the searching widget.
Returns:
- Type
- string
updateDisplay()
With an array of nodes, switch their classes and values.