<commit_before># react-tisch

[![Build Status](https://travis-ci.org/kayak/react-tisch.png?branch=master)](https://travis-ci.org/kayak/react-tisch)
[![Coverage Status](https://coveralls.io/repos/github/kayak/react-tisch/badge.svg?branch=master)](https://coveralls.io/github/kayak/react-tisch?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f65c5b755f6d499a883e293332da2da6)](https://www.codacy.com/app/remi-k2620/react-tisch?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=kayak/react-tisch&amp;utm_campaign=Badge_Grade)
[![David](https://img.shields.io/david/kayak/react-tisch.svg)](https://david-dm.org/kayak/react-tisch)
[![David](https://img.shields.io/david/dev/kayak/react-tisch.svg)](https://david-dm.org/kayak/react-tisch)

Simple table component for react and react-bootstrap. It supports filtering, searching, ordering, pagination, and you
can use custom react components as the table's cells!

## Example

See the [demo](http://kayak.github.io/react-tisch/examples/index.html).

```js
import {Table, Column} from ReactTisch;
import {Glyphicon, Label} from ReactBootstrap;

const sampleData = [
  {
    "name": "<NAME>",
    "eyeColor": "blue",
    "tags": ["magna", "in", "labore", "aliqua", "veniam"]
  },
  ...
];

const EyeColor = function ({eyeColor}) {
    return <Glyphicon glyph="eye-open" style={{color: eyeColor}}/>;
};

const Tags = function ({tags}) {
    return <div>{tags.map((tag, i) =>
            <Label bsStyle="default" key={i}>{tag}</Label>)}</div>;
};

ReactDOM.render(
    <Table data={sampleData}>
        <Column value={row => row.name}>Name</Column>
        <Column filter value={EyeColor} rawValue={row => row.eyeColor}>Eye color</Column>
        <Column value={Tags}>Tags</Column>
    </Table>,
    document.getElementById('example')
);
```

## Development

Build with `npm run build`.

Test with `npm run test`.

## License

Copyright 2016 KAYAK Germany, GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.<commit_msg>Fixing imports in the readme example<commit_after># react-tisch

[![Build Status](https://travis-ci.org/kayak/react-tisch.png?branch=master)](https://travis-ci.org/kayak/react-tisch)
[![Coverage Status](https://coveralls.io/repos/github/kayak/react-tisch/badge.svg?branch=master)](https://coveralls.io/github/kayak/react-tisch?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f65c5b755f6d499a883e293332da2da6)](https://www.codacy.com/app/remi-k2620/react-tisch?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=kayak/react-tisch&amp;utm_campaign=Badge_Grade)
[![David](https://img.shields.io/david/kayak/react-tisch.svg)](https://david-dm.org/kayak/react-tisch)
[![David](https://img.shields.io/david/dev/kayak/react-tisch.svg)](https://david-dm.org/kayak/react-tisch)

Simple table component for react and react-bootstrap. It supports filtering, searching, ordering, pagination, and you
can use custom react components as the table's cells!

## Example

See the [demo](http://kayak.github.io/react-tisch/examples/index.html).

```js
import {Table, Column} from "react-tisch";
import {Glyphicon, Label} from "react-bootstrap";

const sampleData = [
  {
    "name": "<NAME>",
    "eyeColor": "blue",
    "tags": ["magna", "in", "labore", "aliqua", "veniam"]
  },
  ...
];

const EyeColor = function ({eyeColor}) {
    return <Glyphicon glyph="eye-open" style={{color: eyeColor}}/>;
};

const Tags = function ({tags}) {
    return <div>{tags.map((tag, i) =>
            <Label bsStyle="default" key={i}>{tag}</Label>)}</div>;
};

ReactDOM.render(
    <Table data={sampleData}>
        <Column value={row => row.name}>Name</Column>
        <Column filter value={EyeColor} rawValue={row => row.eyeColor}>Eye color</Column>
        <Column value={Tags}>Tags</Column>
    </Table>,
    document.getElementById('example')
);
```

## Development

Build with `npm run build`.

Test with `npm run test`.

## License

Copyright 2016 KAYAK Germany, GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

{'fraction_non_alphanumeric': 0.157429718875502, 'fraction_numerical': 0.01325301204819277, 'mean_word_length': 4.692571428571428, 'pattern_counts': {'":': 6, '<': 31, '<?xml version=': 0, '>': 37, 'https://': 20, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1933463', 'n_tokens_mistral': 1729, 'n_tokens_neox': 1618, 'n_words': 386}