Easy Ember.js table component.
ember-cli-llama-table
is an Ember component for easily
rendering tables with advanced features and functionality.
controllers/index.js:
import Ember from 'ember';
export default Ember.Controller.extend({
tableColumns: [
{
name: 'foo',
label: 'Foo',
order: 1
},
{
name: 'bar',
label: 'Bar',
order: 2
}
],
tableData: [
{
foo: 'abc',
bar: 'def'
},
{
foo: 'ghi',
bar: 'jkl'
}
],
tableConfig: {
sortProperties: ['foo', 'bar']
}
});
templates/index.hbs:
For an example implementation, see the project page.
Column configuration. Defines the appearance and behaviour of table columns. Will be monitored for changes, causing the component to update accordingly.
Wiki page on column definitions.
Table data as an array of objects. Each object has properties which map with column identifiers. Row additions, removals or edits will be reflected by the table.
Table configuration. Specifies additional properties as a single object.
Wiki page on table configuration.
With npm:
$ npm install --save ember-cli-llama-table
Or with Ember CLI:
$ ember install:npm ember-cli-llama-table