ember-bundle-select
v0.4.1
Published
Bundle select primitives for Ember
Downloads
7
Readme
ember-bundle-select
Bundle select primitive for Ember.
Install
ember install https://github.com/storyful/ember-bundle-select.git
Usage
Component
{{#bundle-select-group as |bundle|}}
<table class="table">
{{#each models as |model|}}
{{#bundle-select-option tagName="tr" option=model bundle=bundle as |bundleOption|}}
<td>
<input type="checkbox"
checked={{bundleOption.selected}}
onclick={{action bundleOption.toggleAction}} />
</td>
<td>{{model.name}}</td>
{{/bundle-select-option}}
{{/each}}
</table>
{{/bundle-select-group}}
{{!-- With children options --}}
{{#bundle-select-group as |bundle|}}
<ul class="table">
{{#each models as |model|}}
{{#bundle-select-option tagName="li" option=model bundle=bundle as |bundleOption|}}
...
{{#bundle-select-option option=model.child
parentOption=model
bundle=bundle as |bundleOption|}}
<div>
<input type="checkbox"
checked={{bundleOption.selected}}
onclick={{action bundleOption.toggleAction}} />
</div>
<div>{{model.child.name}}</div>
{{/bundle-select-option}}
{{/bundle-select-option}}
{{/each}}
</ul>
{{/bundle-select-group}}
Actions
- bundle.selectAll
- bundle.selectNone
- bundleOption.toggleAction
Collaborating
Installation
git clone <repository-url>
this repositorycd ember-bundle-select
npm install
Running
ember serve
- Visit your app at http://localhost:4200.
Running Tests
npm test
(Runsember try:each
to test your addon against multiple Ember versions)ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit https://ember-cli.com/.