16.8.0 • Published 2 years ago

itsa-react-table v16.8.0

Weekly downloads
2
License
BSD-3-Clause
Repository
github
Last release
2 years ago

Build Status

Editable React.js table.

This is the very first setup (0.0.1). It is working well, but there will probably be many updates.

Key features:

  • editable
  • focusable
  • extendable

How to use:

import "purecss";

const React = require("react"),
    ReactDOM = require("react-dom"),
    Component = require("./lib/component-styled.jsx");

var data = [
        { id: "ga-3475", name: "gadget",   price: "$6.99", cost: "$5.99" },
        { id: "sp-9980", name: "sprocket", price: "$3.75", cost: "$3.25" },
        { id: "wi-0650", name: "widget",   price: "$4.25", cost: "$3.75" }
    ],
    columns = [
        "id",
        { key: "name", label: "part name" },
        "price",
        "cost"
    ];

const changeData = newData => {
    props.data = newData;
    renderTable(props);
};

let props = {
    autoFocus: true,
    disabled: false,
    tableClass: 'pure-table pure-table-striped',
    extendableY: true,
    columns,
    data,
    rowHeader: true,
    editable: 'full',
    onChange: changeData
};

const renderTable = props => {
    ReactDOM.render(
        <Component {...props} />,
        document.getElementById("component-container")
    );
};

renderTable(props);

About the css

You need the right css in order to make use of itsa-react-table. There are 2 options:

  1. You can use the css-files inside the css-folder.
  2. You can use: Component = require("itsa-react-table/lib/component-styled.jsx"); and build your project with webpack. This is needed, because you need the right plugin to handle a requirement of the scss-file.

View live example

API

16.8.0

2 years ago

16.7.1

6 years ago

16.7.0

6 years ago

16.6.0

7 years ago

16.5.7

7 years ago

16.5.6

7 years ago

16.5.5

7 years ago

16.5.4

7 years ago

16.5.3

7 years ago

16.5.2

7 years ago

16.5.1

7 years ago

16.5.0

7 years ago

16.4.4

7 years ago

16.4.3

7 years ago

16.4.2

7 years ago

16.4.1

7 years ago

16.4.0

7 years ago

16.3.18

7 years ago

16.3.17

7 years ago

16.3.16

7 years ago

16.3.15

7 years ago

16.3.14

7 years ago

16.3.13

7 years ago

16.3.12

7 years ago

16.3.11

7 years ago

16.3.10

7 years ago

16.3.9

7 years ago

16.3.8

7 years ago

16.3.7

7 years ago

16.3.6

7 years ago

16.3.5

7 years ago

16.3.4

7 years ago

16.3.3

7 years ago

16.3.2

7 years ago

16.3.1

7 years ago

16.3.0

7 years ago

16.2.3

7 years ago

16.2.2

7 years ago

16.2.1

7 years ago

16.2.0

7 years ago

16.1.3

7 years ago

16.1.2

7 years ago

16.1.1

7 years ago

16.1.0

7 years ago

16.0.7

7 years ago

16.0.6

7 years ago

16.0.5

7 years ago

16.0.4

7 years ago

16.0.3

7 years ago

16.0.2

8 years ago

16.0.1

8 years ago

16.0.0

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

9 years ago