Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@kenshooui/react-multi-select
Advanced tools
Kenshoo multi select component
Multi select is a straight forward component that helps a user select multiple items in a clear and filterable way.
Installation using npm:
npm install @kenshooui/react-multi-select --save
Installation using Yarn:
yarn add @kenshooui/react-multi-select
import React, { Component } from "react";
import MultiSelect from "@kenshooui/react-multi-select";
class Example extends Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.state = {
items: [
{ id: 0, label: "item 1" },
{ id: 2, label: "item 2" },
{ id: 3, label: "item 3" },
{ id: 4, label: "item 4" }
],
selectedItems: []
};
}
handleChange(selectedItems) {
this.setState({ selectedItems });
}
render() {
const { items, selectedItems } = this.state;
return (
<MultiSelect
items={items}
selectedItems={selectedItems}
onChange={this.handleChange}
/>
);
}
}
Name | Type | Default | Description |
---|---|---|---|
items | List | [] | list of items . |
selectedItems | Array | [] | selected list to start with (subgroup of items). |
onChange | function | ()=>{} | callback for changed event |
loading | boolean | false | toggle to show loading indication. |
messages | Object | {} | custom messages. Please see below for the availabale messages |
showSearch | boolean | true | toggle to show search option. |
showSelectAll | boolean | true | toggle to show select All option in list. |
searchIcon | String | 'search' | search items icon. Options are available here: https://material.io/icons |
deleteIcon | String | 'close' | selected items delete icon. Options are available here: https://material.io/icons |
wrapperClassName | String | '' | wrapper class name. Used for customizing the style |
listHeight | number | 320 | available items list height |
selectedListHeight | number | 361 | selected items list height |
selectedListHeight | number | 40 | list item height |
You can use your own messages. Here is the default messages object :
messages: {
"source.search.placeholder": "Search...",
"source.header.selectAll": "Select all",
"source.noItems": "No items...",
"destination.noItems": "No items...",
"destination.header.clearAll": "Clear all",
"destination.header.none": "None",
"destination.header.selected": "Selected"
}
yarn install
yarn test
or yarn test:watch
yarn storybook
and head to https://localhost:6006Push to github.
If you’ve fixed a bug or added code that should be tested, add tests.
Open a Pull Request with the following guidelines:
Once your Pull Request is issued the test suite and build processes will run and we will review your change.
React 16 or newer
FAQs
React Multi Select
The npm package @kenshooui/react-multi-select receives a total of 0 weekly downloads. As such, @kenshooui/react-multi-select popularity was classified as not popular.
We found that @kenshooui/react-multi-select 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.