normal-list-react

1.1.3 • Public • Published

normal list for react

preview

install

npm install --save-dev normal-list-react style-loader css-loader

webpack.config.js

// add loader
{
    test: /\.css$/,
    loader: "style-loader!css-loader"
}

import

import NormalList from 'normal-list-react'

use

<NormalList
    data={_normalListData.data}
    headerTitles={['序号', 'VIN / 车型', '报价金额', '创建时间']}
    itemKeys={['num', 'type', 'total_money', 'createtime']}
    listClick={this.listClick.bind(this)}/>

data: data source, array with objects

headerTitles: header titles

itemKeys: list item key from object

listClick: list click handle, callback the item

listClick(item) {
    alert(JSON.stringify(item))
}

Readme

Keywords

Package Sidebar

Install

npm i normal-list-react

Weekly Downloads

1

Version

1.1.3

License

MIT

Last publish

Collaborators

  • zweizhao