Skip to content

pingyuanChen/react-dynamic-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Dynamic List Component

react-dynamic-list is a react component, which takes dynamic data and custom template to produce interactive component.

Install

npm install react-dynamic-list --save

Usage

List takes six props, only the data and adapter are required, the others are optional.

  • data: The list of items to be rendered
  • adapter: The description of data.(group or simple)
  • rowDom: The custom row dom render function, which takes postion and data props.
  • headDom: The custom head dom render function.
  • onClickRow: The click row handler which takes e, postion and data props.
  • onHeadRow: The click head handler which takes e, postion and data props.

Example

React.render(
  <List
    data={data}
    adapter={adapter} />,
  document.getElementById('main')
);

To get completed example, you can see example folder.

Demo

Demo

FAQ

About

react dynamic list component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages