react-indexlist
indexlist component based better-scroll for react
Last updated 5 months 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.5                                ...           latest (5 months ago)

8 Versions

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

Copyright 2014 - 2017 © taobao.org |