
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
react-select2-wrapper
Advanced tools
Wrapper for Select2
npm install react-select2-wrapper --save
import Select2 from 'react-select2-wrapper';
<Select2
multiple={true}
data={['bug', 'feature', 'documents', 'discussion']}
options={{
placeholder: 'search by tags',
}} />
With data as an object
import Select2 from 'react-select2-wrapper';
<Select2
multiple={false}
data={[{text: 'bug', id: 1}, {text: 'feature', id: 2}, {text: 'documents', id: 3}, {text: 'discussion', id: 4}]}
options={{
placeholder: 'search by tags',
}} />
With callbacks
<Select2
multiple={true}
data={['bug', 'feature', 'documents', 'discussion']}
onOpen={() => { console.log('onOpen'); } }
onClose={() => { console.log('onClose'); } }
onSelect={() => { console.log('onSelect'); } }
onChange={() => { console.log('onChange'); } }
onUnselect={() => { console.log('onUnselect'); } }
options={{
placeholder: 'search by tags',
}} />
Default theme in css/select2.css
import 'react-select2-wrapper/css/select2.css';
Run webpack-dev-server
npm run start
Run webpack in watch mode
npm run watch
Run webpack for build
npm run build
FAQs
React component for Select2
The npm package react-select2-wrapper receives a total of 10,517 weekly downloads. As such, react-select2-wrapper popularity was classified as popular.
We found that react-select2-wrapper 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.