ember-a11y-datatable
An ember addon for an accessible data table.
Last updated a year ago by rajasegar .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ember-a11y-datatable 
SYNC missed versions from official npm registry.

ember-a11y-datatable

Build Status npm npm version MIT license EmberObserver

Example of an accessible data table addon in Ember.

Based on this article

Demo

Demo

Installation

  • ember install ember-a11y-datatable

Usage

In your templates/components use the ally-datatable component like this:

{{a11y-datatable
  caption="Monthly Budget"
  columns=columns
  rows=rows
}}

In your component/controller initialize the table data like this:

export default Controller.extend({
  columns: computed(function() {
    return [
      {
        label: 'Month',
        valuePath: 'month',
        rowHeader: true
      },
      {
        label: 'Amount Earned',
        valuePath: 'earned'
      },
      {
        label: 'Amount Spent',
        valuePath: 'spent'
      },
      {
        label: 'Amount Saved',
        valuePath: 'saved'
      }
    ];
  }),

  rows: computed(function() {
    return [
      {
        month: "January",
        earned: "$2500",
        spent: "$1500",
        saved: "500"
      },
      {
        month: "February",
        earned: "$2500",
        spent: "$1500",
        saved: "500"
      }
    ];
  })
});

Running Tests

  • npm test (Runs ember 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/.

Current Tags

  • 0.1.2                                ...           latest (a year ago)

2 Versions

  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |