ember-tag-picker
v1.0.3
Published
The default blueprint for ember-cli addons.
Downloads
2
Readme
Ember-tag-picker
A very simple and small addon for common tag design pattern that gives the ember developer complete control
Usage
You will be using the ember-tag-list component
ember-tag-picker [
options=options
value=value
addTag='addTag'
addFromOption='addFromOption'
removeTag='removeTag'
inputValue=inputValue
optionsExpanded=optionsExpanded
]
- options - Array of objects that represent a tag
- value - Array of object that represent a tag
- addTag - Action when a tag is entered manually
- addFromOption - Action when tag is clicked in options list
- removeTag - Action when remove button is clicked on tag
- inputValue - The value of the input text
- optionsExpanded - True if dropdown has been expanded
- tagTemplate - Partial path to use for tag template
- tagOptionsTemplate - Partial path to use for tag option template
- disabled - Disable the input
Example partial templates can be found in /app/templates/components/_tag.emblem
and /app/templates/components/_tag-option.emblem
. The template language is compiled by ember-cli-emblem.
Please keep in mind that if none of the actions are implemented, nothing will happen.
The component renders markup only if options
and value
arrays are modified.
Please see the working example in app/components/example-one.js
Check out the dummy application
git clone
this repositorynpm install
bower install
ember server