table-grid-2d

0.0.4 • Public • Published

Table-grid-2d

Build Status

Generates a spreadsheet-like table grid for representating junk that's naturally spreadsheet-like

HowTo

Suppose you have the following declared variables in your controller

colNames = ["gulag""potato""latvia""cold"]
rowNames = [1..4]
comrades = []
comrades.push colName: "gulag"rowName: 1id: "Mikhail"
comrades.push colName: "potato"rowName: 4id: "Yuri"
comrades.push colName: "cold"rowName: 2id: "Danil"

And you wanted your comrades in sort of bingo-grid spreadsheet table, do the following:

{{#table-grid-2d colNames=colNames rowNames=rowNames data=comrades originLabel="☭" action="cellTouched" as |comrade|}}
  <span>{{comrade.id}}</span>
{{/table-grid-2d}}

to get:

gulag potato latvia cold
1 Mikahil
2 Danil
3
4 Yuri

Notes

Yes, for now, all comrades must have a colName and rowName property. Sorry, perhaps in the future I will make this customizeable

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Package Sidebar

Install

npm i table-grid-2d

Weekly Downloads

5

Version

0.0.4

License

MIT

Last publish

Collaborators

  • foxnewsnetwork