A5SpinList Class
Arguments
- containerIdstring
The ID of the element the spin list should be rendered in.
- dataarray
The data to populate the spin list with. Each item can be a A5.SpinList Item Object object, or a string. If a string is passed in, then the HTML and value of the list item will be the value of the string.
- settingsobject
Settings for the spin list. This will override the initial values of the properties of the A5.SpinList class.
Description
Spin list control.
- Name
- Description
- A5.SpinList.Item Object
Definition of an item in the spin list.
Properties
- themestring
The theme to use on the spin list.
- overridestring
The overrides to use on the spin list.
- inputIdstring
The ID of the INPUT into which the value of the spin list should be set every time the spin list value changes.
- classNamestring
The class name to put on the spin list container element.
- disabledClassNamestring
The class name to put on the spin list container element when the spin list has been disabled.
- itemobject
Spin list item settings.
- classNamestring
The default class name to put on a spin list item element.
- heightnumberstring
The height of the spin list. If an integer number is passed in, then the number of items displayed above and below the selected item will be that value (for instance, the default value of '1' means that three items will be visible - one above, one below, and the selected item). A measured height can be passed in as a string with CSS units (for instance '100px').
- onBeforePopulatefunction(data)
Event fired before the spin list is populated with data. If a value of false is returned by the function the populate will not be done.
- dataobject
The data the spin list is being populated with.
- onPopulatefunction(data)
Event fired when the spin list is populated with data.
- dataobject
The data the spin list was populated with.
- onSelectfunction(value)
Event fired when an item in the spin list is selected.
- valueany
The value selected.
- onChangefunction(value)
Event fired when the value of the spin list changes.
- valueany
The value of the spin list.
Methods
- destroy Method
Destroy the spin list. This method should be called before the spin list is removed from the DOM.
- populate Method
Populate the spin list with new data.
- refresh Method
Refresh the spin list. This will force a recalculation of the spin list height if the height property of the spin list is set to a number of items to display. See the A5.SpinList height property.
- setDisabled Method
Disable or enable the entire spin list.
- setValue Method
Set the value in the spin list.