
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
react-virtualized-checkbox
Advanced tools
Checkbox group component with virtualization for large number of items
Install react-virtualized-checkbox
using npm.
npm install react-virtualized-checkbox --save
yarn add react-virtualized-checkbox
And in your code:
import VirtualizedCheckbox from 'react-virtualized-checkbox'
You pass react-virtualized-checkbox an array of items. Here's a simple example:
import React, { Component } from 'react'
import VirtualizedCheckbox from 'react-virtualized-checkbox'
class MyCheckbox extends Component {
constructor (props) {
super(props)
this.state = {}
}
render () {
const items = [
{ label: "One", value: 1, checked: true},
{ label: "Two", value: 2, checked: true},
{ label: "Three", value: 3, checked: true}
// And so on...
]
return (
<VirtualizedCheckbox
items={items}
onOk={(checkedItems) => this.setState({ checkedItems })}
onCancel={ () => this.setState({ checkedItems: [] })}
/>
)
}
}
Property | Type | Description |
---|---|---|
items | PropTypes.array | Items to choose from; can be an array of strings or an array of objects. |
onOk | PropTypes.func | Callback called when the Ok button is clicked; takes an array of the selected items, a boolean if all items are selected and the text filter as arguments. |
onCancel | PropTypes.func | Callback called when the Cancel button is clicked. |
onChange | PropTypes.func | Callback called when a checkbox is clicked. If a normal checkbox is clicked, will return the item. If the (Select all) checkbox is clicked, will return an array of all filtered items. |
hasFilterBox | PropTypes.bool | If the text filter box is displayed; defaults to true |
hasOkButton | PropTypes.bool | If the Ok button is displayed; defaults to true |
hasCancelButton | PropTypes.bool | If the Cancel button is displayed; defaults to true |
labelKey | PropTypes.string | Label key; defaults to 'label'. |
rowHeight | PropTypes.number | Row height; defaults to 30 pixels. |
height | PropTypes.number | Component height; If not set, will get from the parent. |
width | PropTypes.number | Component width; If not set, will get from the parent. |
FAQs
Checkbox group component with virtualization for large number of items
The npm package react-virtualized-checkbox receives a total of 47 weekly downloads. As such, react-virtualized-checkbox popularity was classified as not popular.
We found that react-virtualized-checkbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.