![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
react-select-virtualized
Advanced tools
* IT IS OUT!!!! *
react-select v2 + react-virtualized + react hooks!
This project came up after hours of trying to find an autocomplete component that supports large sets of data to be displayed and searched for while maintain performance. The only libraries out there that allow this functionality are either not maintained anymore, use outdated libraries or are poorly performant.
I created a component that uses the Airbnb library called react-virtualized
for the virtual data loading of elements and plugged it to the react-select
(the most used autocomplete library for react) menu list.
only takes 15kb or 4Kb Gzipped!!!!!
The select component will be the same from react-select v2
so you will be able to use it with any select you already have.
npm install --save react-select-virtualized
remember to install them also if they are not already in your project.
NOTE: "react-hover-observer" is temporary until I implement it myself will be a dependency (not a peer dep) until then.
{
"prop-types": "^15.5.4",
"react": "^16.8.3",
"react-dom": "^16.8.3",
"react-select": "2.2.0",
"react-virtualized": "^9.21.0",
"classnames": "^2.2.6"
}
Do you want to see it working? -> https://serene-hawking-021d7a.netlify.com/
fast-react-select
.
-- v 1.0.0 --
-- v 1.1.0 --
Props | Type | Default | Description |
---|---|---|---|
grouped | boolean | false | specify if options are grouped |
formatGroupHeaderLabel | function({ label, options}) => component | will render a custom component in the popup grouped header (only for grouped) | |
formatOptionLabel (coming from react-select) | function(option, { context }) => component | will render a custom component in the label | |
optionHeight | number | 31 | height of each option |
groupHeaderHeight | number | header row height in the popover list | |
maxHeight (coming from react-select) | number | auto | max height popover list |
maxWidth (coming from react-select) | number | 500 | max width in the popover list |
We support all the UI related props for the input. Extension also.
List: (...To be completed)
We do not support any related prop to the popup list. We extend it. *Sorry no extension of any component inside the list.*
List Props Supported: (...To be completed)
check storybook for more examples
const options = [
{
value: 1,
label: `guiyep`,
},
...
];
import React, { Component } from 'react';
import Select from 'react-select-virtualized';
const Example extends Component {
render() {
return <Select options={options}/>;
}
}
const Example2 = () => <Select options={options}/>
const Example3 = () => <Select options={options} {..ANY_REACT_SELECT_V2_PROP}/>
check storybook for more examples
const options = [
{
value: 1,
label: `guiyep`,
},
...
];
const opsGroup = [
{ label: `Group Name Header`, options },
...
]
import React, { Component } from 'react';
import Select from 'react-select-virtualized';
const Example extends Component {
render() {
return <Select options={options} grouped/>;
}
}
const Example2 = () => <Select options={options} grouped/>
const Example3 = () => <Select options={options} {..ANY_REACT_SELECT_V2_PROP} grouped/>
MIT © guiyep
FAQs
Select virtualized component using: react-select v4 + react-virtualized + react hooks
The npm package react-select-virtualized receives a total of 4,992 weekly downloads. As such, react-select-virtualized popularity was classified as popular.
We found that react-select-virtualized demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.