Skip to content

stan014/React-Table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Table

##Dependencies

  • lodash

Basic Usage



import {Table, Column } from 'react-table'

var data = [{...},{...},...]

<Table className="...." data={data}>
  <Column name="displayName" k={field}/>
  ...
</Table>

For more details, please check the following:

Table

Property Description Type
header Custom column header component, name, k, sort will be pass to props. element
search search keyword to filter data (See Column:searchkey). string
index Display index column or not, default will be false. boolean
className As className in React. string
data the data you want to present. array

##Column

Property Description Type
name The text will be display in column header. string
k Indicates which data to access. string
className As className in React. string
searchkey Indicates the value of this column will be treat as search target, default is false. boolean
format Format the data you want to display. function
header Indicates specific header for this column, this will overwrite the same property in Table. element
body Custom component to display data. element
custom Indicates props will pass to your body component, when you use 'body' property. any

Releases

No releases published

Packages

No packages published