antd-select-infinte-scroll
v0.9.0
Published
> Infinite scrolling ant design select component
Downloads
405
Readme
antd-select-infinte-scroll
Infinite scrolling ant design select component
Install
npm install --save antd-select-infinte-scroll
Usage
import React, { Component } from 'react'
import MyComponent from 'antd-select-infinte-scroll'
class Example extends Component {
render() {
return <InfiniteScrollSelect style={{ width: '400px' }} data={data} hasMore={page > 5 ? false : true} loadMore={this.getMoreData} />
}
}
props
| name | type | required | default | description |
| ------------ | ------------------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| data | array (of objects) | true | [] | array of dropdown data, each element must be object with properties {label,value}
|
| hasMore | boolean | false | false | if true data loaded on scroll |
| loadMore | function | true | null | function to get next data, please manage page number in this function |
License
MIT © mrinalraj