react-indexlist
Description
Indexlist component based better-scroll for react。
Quick Start
Install
npm install react-indexlist --saveor yarn add react-indexlist
Usage
;;
{console;}<IndexList data=arr onSelect=thishandleSelect className="my-indexlist" />
Example
Prop types
propTypes:// className of componentclassName: PropTypesstring// Array of listdata: PropTypesarrayisRequired // Default: Array<{ title: string, items: array<{ name: string }> }>// render item by self, return ReactNoderenderItem: PropTypesfunc // function (item)// onClick item callbackonSelect: PropTypesfunc // function (item)