<commit_before># ember-cli-llama-table

Easy Ember.js table component.

[![master branch build status](https://travis-ci.org/luxbet/ember-cli-llama-table.svg?branch=master)](https://travis-ci.org/luxbet/ember-cli-llama-table)

`ember-cli-llama-table` is an [Ember][ember] [component][component] for easily
rendering tables with advanced features and functionality.

## Example

**controllers/index.js**:

```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**:

```hbs
{{llama-table rows=tableData columns=tableColumns config=tableConfig}}
```

For an example implementation, see [the project page][example].

## Properties

**`columns`**:

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][columns].

**`rows`**:

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.

**`config`**

Table configuration. Specifies additional properties as a single object.
* `'sortProperties'` (`String[]`) - Names of columns to sort by
* `'sortAscending'` (`Boolean`)
* `'types'` (`Object[]`) - Collection of types defined with fields:
  * `'name'` (`String`) - Maps to column definition type
  * `'view'` (`Ember.View`) - View constructor to use for this cell

## Installing

With [npm][npm]:

```sh
$ npm install --save ember-cli-llama-table
```

Or with [Ember CLI][cli]:

```sh
$ ember install:npm ember-cli-llama-table
```

## License

[MIT license](LICENSE.md).

[ember]: http://emberjs.com/
[component]: http://emberjs.com/api/classes/Ember.Component.html<commit_msg>Added note on sortFunction to readme<commit_after># ember-cli-llama-table

Easy Ember.js table component.

[![master branch build status](https://travis-ci.org/luxbet/ember-cli-llama-table.svg?branch=master)](https://travis-ci.org/luxbet/ember-cli-llama-table)

`ember-cli-llama-table` is an [Ember][ember] [component][component] for easily
rendering tables with advanced features and functionality.

## Example

**controllers/index.js**:

```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**:

```hbs
{{llama-table rows=tableData columns=tableColumns config=tableConfig}}
```

For an example implementation, see [the project page][example].

## Properties

**`columns`**:

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][columns].

**`rows`**:

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.

**`config`**

Table configuration. Specifies additional properties as a single object.
* `'sortProperties'` (`String[]`) - Names of columns to sort by
* `'sortAscending'` (`Boolean`)
* `'sortFunction'` (`Function`)
* `'types'` (`Object[]`) - Collection of types defined with fields:
  * `'name'` (`String`) - Maps to column definition type
  * `'view'` (`Ember.View`) - View constructor to use for this cell

## Installing

With [npm][npm]:

```sh
$ npm install --save ember-cli-llama-table
```

Or with [Ember CLI][cli]:

```sh
$ ember install:npm ember-cli-llama-table
```

## License

[MIT license](LICENSE.md).

[ember]: http://emberjs.com/
[component]: http://emberjs.com/api/classes/Ember.Component.html
{'fraction_non_alphanumeric': 0.14755575580085606, 'fraction_numerical': 0.0009011038522189682, 'mean_word_length': 3.0253853127833183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4274183', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1348, 'n_words': 400}