react-indexlist
indexlist component based better-scroll for react
Last updated 18 days ago by yanyuanfe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-indexlist 
SYNC missed versions from official npm registry.

react-indexlist

Description

Indexlist component based better-scroll for react。

Quick Start

Install

npm install react-indexlist --save

or yarn add react-indexlist

Usage

import IndexList from 'react-indexlist';
import 'react-indexlist/dist/index.css';
handleSelect = (item) => {
    console.log(item);
}

<IndexList data={arr} onSelect={this.handleSelect} className="my-indexlist" />

Example

indexlist

indexlist

indexlist

Prop types

propTypes: {

    // className of component
    className: PropTypes.string,

    // Array of list
    data: PropTypes.array.isRequired, // Default: Array<{ title: string, items: array<{ name: string }> }>

    // render item by self, return ReactNode
    renderItem: PropTypes.func, // function (item)

    // onClick item callback
    onSelect: PropTypes.func, // function (item)
}

License

MIT

Current Tags

  • 1.0.7                                ...           latest (18 days ago)

10 Versions

  • 1.0.7                                ...           18 days ago
  • 1.0.6                                ...           18 days ago
  • 1.0.5                                ...           8 months ago
  • 1.0.4                                ...           8 months ago
  • 1.0.3                                ...           8 months ago
  • 1.0.2                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 11
Last Day 0
Last Week 3
Last Month 53
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |