d2l-insights-roles-input v0.12.0
d2l-insights-roles-input
Overview
This library contains the roles input control.
API Docs
getNew(parentElement, rolesData, roleSelectorChangeCb)
Create a new widget contained by parentElement
with rolesData
, with roleSelectorChangeCb(selectedRoleIds)
as callback function which will be called with a list of RoleIds everytime roles selection changed.
Note that this will bind event liseners to the created element.
setRolesHeader(subHeaderElement, roleSelector)
Update the subHeaderElement
based on the current selection of roleSelector
, you are expected to call this function in the needed time in order to sync the subHeaderElement
with roleSelector
.
setSubHeaderShowAllLink(subHeaderShowAllLinkElement, roleSelector)
Update the subHeaderShowAllLinkElement
based on the current selection of roleSelector
, you are expected to call this function in the needed time in order to sync the subHeaderShowAllLinkElement
with roleSelector
.
setSubHeaderShowAllRoles(subHeaderElement, subHeaderShowAllLinkElement, roleSelector)
Update the subHeaderElement
and subHeaderShowAllLinkElement
based on the current selection of roleSelector
, you are expected to call this function in the needed time in order to sync the subHeaderElement
and subHeaderShowAllLinkElement
with roleSelector
.