Components.DropdownButton public
Button component with that can act as a dropdown toggler.
See Components.Dropdown for examples.
Item Index
Methods
Properties
Events
click
privateresetState
private
This will reset the state property to 'default', and with that the button's label to defaultText
_disabled ?boolean private
Property to disable the button only used in internal communication
between Ember Boostrap components.
active boolean public
Set the 'active' class to apply active/pressed CSS styling
block boolean public
Property for block level buttons (BS3 and BS4 only!)
See the [Bootstrap docs](http://getbootstrap.com/css/#buttons-sizes)
bubble boolean public
A click event on a button will not bubble up the DOM tree if it has an
onClick
action handler. Set to true to
enable the event to bubble
defaultText string public
Default label of the button. Not need if used as a block component
fulfilledText string public
Label of the button used if
onClick
event has returned a Promise which succeeded.
Not considered if used as a block component.
icon String public
Class(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 public
If button is active and this is set, the icon property will match this property
iconInactive String public
If button is inactive and this is set, the icon property will match this property
isFulfilled Boolean private
Promise returned by
onClick
event has been succeeded.
isPending Boolean private
Promise returned by
onClick
event is pending.
isRejected Boolean private
Promise returned by
onClick
event has been rejected.
isSettled Boolean private
Promise returned by
onClick
event has been succeeded or rejected.
outline boolean public
Property to create outline buttons (BS4+ only)
pendingText string public
Label of the button used if
onClick
event has returned a Promise which is pending.
Not considered if used as a block component.
preventConcurrency Boolean public
Controls if
onClick
action is fired concurrently. If true
clicking button multiple times will not trigger
onClick
action if a Promise returned by previous click is not settled yet.
This does not affect event bubbling.
rejectedText string public
Label of the button used if
onClick
event has returned a Promise which failed.
Not considered if used as a block component.
reset boolean public
Set this to
true
to reset the state
. A typical use case is to bind this attribute with ember-data isDirty flag.
The old value is not taken into consideration. Setting a true
value to true
again will also reset state
.
In that case it's even to notify the observer system that the property has changed by calling
[notifyPropertyChange()
](https://www.emberjs.com/api/ember/3.2/classes/EmberObject/methods/notifyPropertyChange?anchor=notifyPropertyChange).
size String public
Property for size styling, set to 'lg', 'sm' or 'xs'
Also see the [Bootstrap docs](https://getbootstrap.com/docs/4.3/components/buttons/#sizes)
state String private
State 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 a promise.
Possible values are: "default" > "pending" > "fulfilled" / "rejected".
It could be resetted by reset
property.
type String public
Property for type styling
For the available types see the [Bootstrap docs](https://getbootstrap.com/docs/4.3/components/buttons/)
value any public
Supply a value that will be associated with this button. This will be sent
as a parameter of the default action triggered when clicking the button
onClick
public
When clicking the button this action is called with the value of the button (that is the value of the "value" property).
Return a promise object, and the buttons state will automatically set to "pending", "resolved" and/or "rejected".
This could be used to automatically set the button's text depending on promise state (
defaultText
, pendingText
,
fulfilledText
, rejectedText
) and for further customization using the yielded isPending
, isFulfilled
,
isRejected
properties.
The click event will not bubble up, unless you set bubble
to true.
Event Payload:
-
value