1.3.11 • Published 7 years ago
@liorheber/retable v1.3.11
ReTable - Work in progress, DO NOT USE
Retable is a table component written in React. ReTable Demo
Main Features
- Customized renderers
- Server side sorting
- Resizeable columns
- Theme support
- Sticky header and footer
- Row selection
- Customized server side filtering (Coming soon)
- Virtualized rows (Coming soon)
- Movable columns (Coming soon)
- Tree model (Coming soon)
How to install
Installation using npm:
 npm install @liorheber/retable --saveInstallation using Yarn:
 yarn add @liorheber/retableHow to use
import React, { Component } from "react";
import ReTable from "@liorheber/retable";
class Example extends Component {
  constructor(props) {
    super(props);
    this.state = {
      columns: [{
        id: "C0",
        name: "Average score (%)",
        type: "PERCENTAGE",
        width: 200,
        sortable: true
    },{
        id: "C1",
        name: "Class",
        type: "TEXT",
        width: 100,
        filterable: true,
        sortable: true,
        resizable: true,
    },{
        id: "C2",
        name: "Date of test",
        type: "DATE",
        width: 125,
        filterable: true,
        sortable: true
    }],
      rows: [
        {C0: 67, C1: "3rd grade", C2: 1452672956000},
        {C0: 82, C1: "5th grade", C2: 1351672951000},
        {C0: 99, C1: "6th grade", C2: 1252672258000},
      ]
    };
  }
  render() {
    const { columns, rows } = this.state;
    return (
      <ReTable
        columns={columns}
        rows={rows}
      />
    );
  }
}