react-windowed-dropdown
v1.0.3
Published
Composed component of react-window and react-dropdown for cases where the dropdown has performance problems. Has a cutoff option for maximum shown options in the select while allowing the filtering to still work on the whole dataset.
Downloads
5
Readme
react-windowed-dropdown
Composed component of react-window and react-dropdown for cases where the dropdown has performance problems
Install
npm install --save react-windowed-dropdown
Usage
import React, { Component } from 'react'
import ReactWindowedSelect from 'react-windowed-dropdown'
import 'react-windowed-dropdown/dist/index.css'
const values = []
for (let i = 0; i < 50000; i = i + 1) {
values.push({
value: i,
label: `${i}`,
})
}
class Example extends Component {
render() {
return <ReactWindowedSelect options={values} optionsCutoff={5000} />
}
}
Note
This project could have simply been forked from react-windowed-select but alas I found out about it too late.
Credits
Additional credits go to react-windowed-select project creator Jacob Worrel @jacobworrel and all the contributors on that project. Implementation of the MenuList from that project helped creatly redusing issues and errors.
License
MIT © oujovalk