Class: SubList

caph.stripe.ui.component. SubList

new SubList(property)

A class which provides a sub list used by DropdownList and PopupMenu in stripe theme.

Parameters:
Name Type Description
property Object

An object which initializes this component. Refer to the details in caph.stripe.ui.component.ListMenu constructor.

Since:
  • 2.1.0
Example
var SubList = caph.require('stripe.ui.component.SubList');

 var subList = new SubList({
      width: 200,
      position: [10, 10],
      type: caph.ui.base.component.ListText.SELECTBOX,
      items: ['Superior', 'Ontario', 'Michigan'],
      selectedIndex: 3,
      on: {
          selected: function(message) {
              console.log(message.detail.item);
      }
 });

Extends

Methods

onpostrender()

A handler to listen for the postrender event. Calculates sub list items position. Besides, decorates the sub list appearance.

Since:
  • 2.1.0
Example
No example available. This method is automatically called by "caph.module.event.Manager". See "caph.module.mixins.event.Observer" example for more details.

setOption(property)

Sets this component properties.

Parameters:
Name Type Description
property Object

Refer to the details in caph.ui.base.component.ListMenu#setOption.

Since:
  • 2.1.0
Inherited From:
Example
var ListMenu = caph.require('stripe.ui.component.ListMenu');

 var listMenu = new ListMenu({
     width: 200,
     position: [10, 10]
 });
 
 listMenu.setOption({
     type: caph.ui.base.component.ListText.CHECKBOX,
     items: ['Superior', 'Ontario', 'Michigan'],
     selectedIndex: 3
 });