1.2.1 • Published 6 years ago

@empd/reactable v1.2.1

Weekly downloads
36
License
MIT
Repository
github
Last release
6 years ago

React Table It

CircleCI Test Coverage Maintainability

Data table component with React

Demo

Installation

$ npm i @emp/reactable

or

$ yarn add @emp/reactable

Usage

import Table from '@empd/reactable';
import '@empd/reactable/lib/styles.css';

Props

PropsRequiredDescriptionTypeDefault
data-Data to load on table[][]
columns-Table column settingsarray of objects Object contains some/ all properties below name: string or element (required) className: string attributes: Object of html attributes selector: string sortable: boolean unsearchable: boolean cell: element or function function passes current row data and returns element[]
emptyPlaceholder-Data to load on table[][]
dataLength-Specify length of all data when loading from server. Note: server props must true[][]
emptyPlaceholder-Placeholder when table is empty.string | element'No data found'
pageOptions-Data to load on tablearray of numbers[10, 30, 50]
server-Set if pagination is handled by asynchronouslybooleanfalse
customPagination-Render custom paginationbooleanfalse
paginationComponent-Custom pagination componentfunctionundefined
paginationPosition-Position of pagination componentOne of ['top', 'bottom', 'both', 'none']'top'
onPageChange-Custom page change functionfunction with params (offset, limit, searchValue) Note: server props must true-
onSort-Custom sort functionfunction with params (selector/key, ascending(boolean))undefined
searchPlaceholder-Search box placeholderstring'Search'
search-Set visibility of search boxbooleantrue
containerClass-CSS class for package componentstring''
tableClass-CSS class for tablestring''
headerClass-CSS class for table headerstring''
rowClass-CSS class for table rowstring''
header-Custom header componentelementnull
footer-Custom footer componentelementnull

Technology

Table It uses a number of open source projects to work properly:

Development

Want to contribute? Great!

We use Webpack for fast developing. Make a change in your file and instantanously see your updates!

Open your favorite Terminal and run these commands.

Install dependenies: $ yarn

Start application:$ yarn start

Ensure the tests are stable with good coverage: $ yarn test

Ensure the test have good coverage: $ yarn test:coverage

(optional) Run storybook: $ yarn storybook

License

MIT

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.1.5

6 years ago

1.1.3

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago