react-dj-table

git icon
Change theme

Quick Start

YarnInstallQuickStartJSON

Installation #

yarn add react-dj-table

Reference the table #

   import Table from 'react-dj-table'

The table expects an array of JSON objects, nothing special just regular tabular json.

Id columns are not required, although advised

Provide Data #

  const json = [
{ Name: "Tye", Email: "ttorr0@ucoz.com", IsRetired: true, Department: "Marketing"},
{ Name: "Marna", Email: "mverbeke1@admin.ch", IsRetired: false, Department: "Business Development"},
{ Name: "Becca", Email: "bboddie2@clickbank.net", IsRetired: true, Department: "Accounting"}
];

Add Table Component #

   <Table json={json} />

https://codesandbox.io/s/bac-72cu9

Add Options #

Options are not mandatory.

   const options = {
sortable:true,
selectable: true,
selectedRowCss: "selectedRow"
};
    <Table json={json} options={options} />

https://codesandbox.io/s/bac-forked-vuk8l?file=/index.js