the drop-down select widget to rule them all
ember install ember-frost-select
Attribute | Type | Value | Description |
---|---|---|---|
selected |
number or array |
1 or [1, 2] |
The indices of the pre-selected values corresponding to values in the passed-in data. |
data |
array |
[{"label: "foo", "value": "bar"}] |
An array of "label"/"value" key/value pairs representing the rows in the select drop-down. |
on-change |
string |
<action-name> |
The action callback to call when the value of the select component changes |
on-input |
string |
<action-name> |
The action callback to call when the value of the filter changes as the user types |
Assuming the following data is available in the consuming context:
data = [
{
"label": "foo",
"value": "bar"
},
{
"label": "fizz",
"value": "buzz"
}
]
singleSelected = 1
multipleSelected = [1, 2]
{{frost-select
data=data
selected=singleSelected
on-change=(action 'yourCallbackAction')
}}}
{{frost-multi-select
data=data
on-change=(action 'yourCallbackAction')
selected=multipleSelected
}}}
{{frost-select
data=data
on-change=(action 'yourCallbackAction')
on-input=(action 'yourInputFilterCallbackAction')
}}}
##Contributing This following outlines the details of collaborating on this Ember addon:
git clone
this repositorynpm install
bower install
ember server
- Visit your app at http://localhost:4200.
npm test
(Runsember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.