Module: common/select-sk

select-sk

Clicking on the children will cause them to be selected.

The select-sk elements monitors for the addition and removal of child elements and will update the 'selected' property as needed. Note that it does not monitor the 'selected' attribute of child elements, and will not update the 'selected' property if they are changed directly.

Events
Name Description
selection-change Sent when an item is clicked and the selection is changed. The detail of the event contains the child element index:
    detail: {
      selection: 1,
    }
  
Source:
Example
<select-sk>
    <div></div>
    <div></div>
    <div selected></div>
    <div></div>
  </select-sk>

Members

selection

Properties:
Name Type Description
selection number The index of the item selected. Has a value of -1 if nothing is selected.
Source: