-
Notifications
You must be signed in to change notification settings - Fork 18
List
Jimgskoop edited this page Nov 24, 2011
·
3 revisions
A List is a simple UI component that maintains state on a list of elements, e.g. the index of the selected element, the total number of elements, etc.
TBD: support for events such as goto(), previous(), next(), etc. (do those belong in the Carousel proper?)
TBD: may broadcast custom events like onChange(), onBeforeChange(), etc.
Everywhere. Used in Carousels, Tabs, DropLists, StyledDropList, Typeaheads, Menus, etc.
- Listen for configurable event(s).
- Change the selected index.
- Add to or delete elements from the list.
- On event emit another configurable event
<ul role="ui:List" data-config="{
'ui:List': {
out: 'onChange'
}
}">
<li class="selected">one</li>
<li>two</li>
<li>three</li>
</ul>
- selected -- Fires when the selected list item changes.
- max -- Fires when the last+1 item selection is attempted.
- min -- Fires when the first-1 item selection is attempted.
- select
- next
- previous
- first
- last