
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
multi-select-react
Advanced tools
Multi Select React – A React Component providing multi select and single select functionality.
A React Component providing multi select and single select functionality.(under development)
npm install multi-select-react
import React, { Component } from 'react';
import MultiSelectReact from 'multi-select-react';
class MyComponent extends Component {
constructor() {
super();
this.state = {
multiSelect: []
};
}
render() {
const selectedOptionsStyles = {
color: "#3c763d",
backgroundColor: "#dff0d8"
};
const optionsListStyles = {
backgroundColor: "#dff0d8",
color: "#3c763d"
};
return (
<MultiSelectReact
options={this.state.multiSelect}
optionClicked={this.optionClicked.bind(this)}
selectedBadgeClicked={this.selectedBadgeClicked.bind(this)}
selectedOptionsStyles={selectedOptionsStyles}
optionsListStyles={optionsListStyles} />
);
}
optionClicked(optionsList) {
this.setState({ multiSelect: optionsList });
}
selectedBadgeClicked(optionsList) {
this.setState({ multiSelect: optionsList });
}
}
import React, { Component } from 'react';
import MultiSelectReact from 'multi-select-react';
class MyComponent extends Component {
constructor() {
super();
this.state = {
multiSelect: []
};
}
render() {
const selectedOptionsStyles = {
color: "#3c763d",
backgroundColor: "#dff0d8"
};
const optionsListStyles = {
backgroundColor: "#dff0d8",
color: "#3c763d"
};
return (
<MultiSelectReact
options={this.state.multiSelect}
optionClicked={this.optionClicked.bind(this)}
selectedBadgeClicked={this.selectedBadgeClicked.bind(this)}
selectedOptionsStyles={selectedOptionsStyles}
optionsListStyles={optionsListStyles}
isSingleSelect={true} />
);
}
optionClicked(optionsList) {
this.setState({ multiSelect: optionsList });
}
selectedBadgeClicked(optionsList) {
this.setState({ multiSelect: optionsList });
}
}
Default value for isSingleSelect is false, for using this component as normal single select component set isSingleSelect to true.
import React, { Component } from 'react';
import MultiSelectReact from 'multi-select-react';
class MyComponent extends Component {
constructor() {
super();
this.state = {
multiSelect: []
};
}
render() {
const selectedOptionsStyles = {
color: "#3c763d",
backgroundColor: "#dff0d8"
};
const optionsListStyles = {
backgroundColor: "#dff0d8",
color: "#3c763d"
};
return (
<MultiSelectReact
options={this.state.multiSelect}
optionClicked={this.optionClicked.bind(this)}
selectedBadgeClicked={this.selectedBadgeClicked.bind(this)}
selectedOptionsStyles={selectedOptionsStyles}
optionsListStyles={optionsListStyles}
isTextWrap={true} />
);
}
optionClicked(optionsList) {
this.setState({ multiSelect: optionsList });
}
selectedBadgeClicked(optionsList) {
this.setState({ multiSelect: optionsList });
}
}
Default value for isTextWarp is true, for component to grow vertically and display all options selected set isTextWarp to false.
Prop | Type | Default | Description |
---|---|---|---|
selectedOptionsColor | object | {} | CSS for MultiSelect options selected badges |
optionsListStyles | object | {} | CSS for MultiSelect options drop down |
options | array | R | Options to be pre-populated in select |
optionClicked | function | R | Callback, invoked after an option is clicked |
selectedBadgeClicked | function | R | Callback, invoked after an selected option badge |
isSingleSelect | boolean | Optional | Boolean value for single select functionality, component's default behavior is multi select |
isTextWrap | boolean | Optional | Boolean value for text wrap i.e selected option will expand horizontally |
[MIT]
FAQs
Multi Select React – A React Component providing multi select and single select functionality.
The npm package multi-select-react receives a total of 162 weekly downloads. As such, multi-select-react popularity was classified as not popular.
We found that multi-select-react 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.