Components.DropdownButton Class
Button component with that can act as a dropdown toggler.
See Components.Dropdown for examples.
Item Index
Methods
Methods
click
protectedClick handler. This will send the default "action" action, with the following parameters:
- value of the button (that is the value of the "value" property)
- original event object of the click event
- callback: call that with a promise object, and the buttons state will automatically set to "pending", "resolved" and/or "rejected"
When using closure actions just return the promise instead of calling the above mentioned callback.
Parameters:
-
evt
Object
resetState
protectedThis will reset the state property to 'default', and with that the button's label to defaultText
Properties
action string
protectedDefault: toggleDropdown
active boolean
publicSet the 'active' class to apply active/pressed CSS styling
Default: false
ariaRole string
protectedDefault: button
classTypePrefix String
protectedDefault: 'btn'
defaultText string
publicDefault label of the button. Not need if used as a block component
disabled boolean
publicProperty to disable the button
Default: false
icon String
protectedClass(es) (e.g. glyphicons or font awesome) to use as a button icon This will render a element in front of the button's label
iconActive String
publicIf button is active and this is set, the icon property will match this property
iconInactive String
publicIf button is inactive and this is set, the icon property will match this property
reset boolean
publicSet this to true to reset the state. A typical use case is to bind this attribute with ember-data isDirty flag.
size String
publictextState String
protectedState of the button. The button's label (if not used as a block component) will be set to the
<state>Text
property.
This property will automatically be set when using a click action that supplies the callback with an promise
Default: 'default'
title string
publicThe HTML title attribute
toggle boolean
publicIf toggle property is true, clicking the button will toggle the active state
Default: false
type String
publicDefault: 'default'
value any
publicSupply a value that will be associated with this button. This will be send as a parameter of the default action triggered when clicking the button