Name: ember-simple-select
Owner: PeopleDoc
Description: A simple select component for your Ember 2.0+ applications
Created: 2015-10-08 15:53:37.0
Updated: 2017-11-20 15:19:36.0
Pushed: 2017-06-02 12:52:27.0
Homepage: null
Size: 34
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
this Repo is a shameless copy/paste from this JSBin.
It offers a {{simple-select}}
component that comes as a replacement
for the deprecated Ember.Select
, while following all the Ember 2.0 guidelines.
$ ember install ember-simple-select
ember-get-helper
is required for ember 1.13.
With `selection`, you give an object
that corresponds to the selection}}
mple-select
content=yourData
optionValuePath="id"
optionLabelPath="displayName"
selection=currentlySelectedObject
prompt="Please select a value"
action=doSomethingWhenTheSelectionChanged}}
Here you give the value}}
mple-select
content=yourData
optionValuePath="id"
optionLabelPath="displayName"
value=currentlySelectedValue
prompt="Please select a value"
action=doSomethingWhenTheSelectionChanged}}
If you want to use the prompt as an empty value, you can do that by using the allowEmpty
property:
mple-select
...
prompt="Please select a value"
allowEmpty: true}}
The receiving actions will be called with 2 arguments:
selection
, which is the object that corresponds to the selected entry from content
.value
that is the actual value in the <option>
tag (resolved by optionValuePath
).git clone
this repositorynpm install
bower install
ember server
npm test
(Runs ember 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/.