ListSelector Component Referencetml`
<ListSelector />
`
The ListSelector component is a Selector component (it extends SelectorBaseCmp) that renders a <ul> with a list of selectable items. The items may have one level of sub-items, in which case the list expands to show the sub-items when selected ("accordions"). Only one group of sub-tiem can be expanded at one time. If another group is selected, the previous one collapses.
If the ListSelector component has a timeout attribute, an expanded group will automatically collapse after the specified amount of time.
ListSelector component accepts the standard attributes.onClickfn(value) where value is the value associated with the selected option. The displayed list reflects the newly selected option. The function may subsequently override the selection by setting calling the setValue() method if required.optionsoptions attribute; they are converted to {value, text} objects only when options are passed to setOptions()). An element contains the following properties:optionsoptions property, it is an accordion group and its text is the group heading. The options property must contain an array of objects containing both a text property and a value property.texttext does not default to value, so it should always be supplied.value The value of the state variable if this option is selected.
An option whose value is the empty string is not displayed.
onClickThru&rightChevron; symbol to indicate that more information is available on a second click.showSelectiontimeouttimeout milliseconds.valueoptions array.disabledThese methods are intended to be used by parent components to dynamically change the properties of the rendered components without re-rendering.
setValue()setValue(value)
Sets the rendered element's value.
valuevalue of one of the options). The list is remounted so the highlight reflects the new value.The ListSelector component ignores any children.
ListSelector component renders a <div style="overflow-y:auto"> wrapping a <ul> elemment containing a <li> element for each option.<div> has a CSS class string that contains listSelector (and any className attribute). The <ul> has no class.<li> element is rendered for each option. Each <li> element has a CSS class string that contains listSelector_item.<li> element (only when showSelection is truthy) will have a CSS class string that contains listSelector_item-selected. The others will have listSelector_item-unselected.<li> with the class listSelector_accordionItem and listSelector_item-sel (collapsed group containing the selected item, when showSelection is truthy) or listSelector_item-unsel, containing a listSelector_caret chevron. An expanded group is followed by a <ul class="listSelector_sub"> of its items.