Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-pinyin-select-2
Advanced tools
本项目fork自react-select-pinyin,基于react-select开发。
相对于react-select,添加了以下特性:
相对于react-select-pinyin,添加了以下特性:
ES2015
语法https://javascript-ninja.github.io/react-pinyin-select
npm install react-pinyin-select-2 --save
直接 require
或 import
使用即可,具体的 api 和 react-select 一致:
import PinyinSelect from 'react-pinyin-select';
const options = [
{ value: '110100', label: '北京市' },
{ value: '120100', label: '天津市' }
];
function logChange(val, option) {
console.log(val, option);
}
<PinyinSelect
name="form-field-name"
value="one"
options={options}
onChange={logChange}
/>
默认的 css 在 lib/default.css
中,如果你使用webpack
之类的构建工具并配置了对应的loader
,可以这样使用:
require ('react-pinyin-select/lib/default.css'); // CommonJS
import 'react-pinyin-select/lib/default.css'; // ES2015
否则请按照你项目中插入 css 的方式自行取用。
FAQs
React选择控件(支持拼音搜索)
We found that react-pinyin-select-2 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.