Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@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 1,036 weekly downloads. As such, @kenshooui/react-multi-select popularity was classified as 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.