0.0.6 • Published 6 years ago

react-expandable-table v0.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

react-expandable-table

Installation

The package can be installed via npm by running: npm install, or npm i for brevity.

Usage

import Table from 'react-expandable-table';

...

<Table columns={[{ key: 'red' }, { key: 'blue' }]} dataSource={[{ red: true, blue: false }, { red: false, blue: true }]} />

API

Props

Function({ onClick, isExpanded }):ReactNode|ReactNodeexpandCellWidthnumber50falseThe fixed width (in pixels) of the expand row button cell.isBorderedboolfalsefalseIf true, the table will be styled with borders.onRowClickfuncfalseFunction to be invoked when a row is clicked.

Function(rowData, rowIndex):voidonRowExpandfuncfalseFunction to be invoked when a row expand icon is clicked The expand icon will be included by default if you provide an onRowExpand function.

Function(rowData, rowIndex):ReactNode|ReactNode

Column Props

Development

First, install necessary dependencies: npm i

Then start up the styleguide server on localhost:6060: npm start

You can edit or add to the styleguide examples in Table.md.

To run the test suite: npm run test or npm run test:watch

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago