Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
react-bootstrap-dropdown
Advanced tools
It's a react dropdown for bootstrap, named reactbsDropdown
The reactbsDropdown include all basic function in dropdown
include set title, listen change, disable item, disable dropdown, divier.
reactbsDropdown dependencies on react 0.13.x and Bootstrap 3
reactbsDropdown written by ES6 and use gulp and browserify to build
Use following command to prepare development
$ git clone https://github.com/AllenFang/react-bootstrap-dropdown.git
$ cd react-bootstrap-dropdown
$ npm install
Use gulp to build the reactbsDropdown
$ gulp dev #for development
$ gulp prod #for production
Download reactbsDropdown first.
npm install react-bootstrap-dropdown --save
Use reactbsDropdown in your react app
You can import reactbsDropdown in module(CommonJS/AMD)
var Dropdown = require("react-bootstrap-dropdown");
or in browser(window object)
<script src="path/to/react-bootstrap-dropdown/react-bootstrap-dropdown.min.js" />
the react-bootstrap-dropdown.min.js file you can find in the dist folder
After import reactbsDropdown, use it in your react app
You can find more detail example code in example folder
// a callback function will be called if dropdown item select
function select(item){
alert(item.text+","+item.value);
}
var aBasicItemModel = [
{
text: "Action",
value: "1"
}
//...
];
var aDividerItemModel = [
{
text: "",
value: "",
isDivider: true
}
//...
];
var aDisableItemModel = [
{
text: "Action",
value: "1",
disabled: true
}
//...
];
React.render(
<Dropdown
title="MyDropdown"
items={youItemsModel}
onSelect={select} />,
document.getElementById("example")
);
The reactbsDropdown setting
Use title
to specify the text show on the dropdown
Use item
to specify the dropdown items
Use onSelect
to listen a select event on dropdown
FAQs
It's a bootstrap dropdown for react.js
The npm package react-bootstrap-dropdown receives a total of 138 weekly downloads. As such, react-bootstrap-dropdown popularity was classified as not popular.
We found that react-bootstrap-dropdown 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.