Package Exports
- rc-dropdown
- rc-dropdown/assets/index.css
- rc-dropdown/es/index.js
- rc-dropdown/lib/index.js
- rc-dropdown/lib/placements
- rc-dropdown/lib/placements.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-dropdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rc-dropdown
react dropdown component
Screenshot

Example
online example: http://react-component.github.io/dropdown/examples/
install
Usage
var Dropdown = require('rc-dropdown');
// use dropdownAPI
props
| name | type | default | description |
|---|---|---|---|
| overlayClassName | String | additional css class of root dom node | |
| openClassName | String | `${prefixCls}-open` | className of trigger when dropdown is opened |
| prefixCls | String | rc-dropdown | prefix class name |
| transitionName | String | dropdown menu's animation css class name | |
| animation | String | part of dropdown menu's animation css class name | |
| placement | String | bottomLeft | Position of menu item. There are: top, topCenter, topRight, bottomLeft, bottom, bottomRight |
| onVisibleChange | Function | call when visible is changed | |
| visible | boolean | whether tooltip is visible | |
| defaultVisible | boolean | whether tooltip is visible initially | |
| overlay | rc-menu | rc-menu element | |
| onOverlayClick | function(e) | call when overlay is clicked | |
| minOverlayWidthMatchTrigger | boolean | true (false when set alignPoint) | whether overlay's width must not be less than trigger's |
| getPopupContainer | Function(menuDOMNode): HTMLElement | () => document.body | Where to render the DOM node of dropdown |
Note: Additional props are passed into the underlying rc-trigger component. This can be useful for example, to display the dropdown in a separate portal-driven window via the getDocument() rc-trigger prop.
Development
npm install
npm startTest Case
npm test
npm run chrome-testCoverage
npm run coverageopen coverage/ dir
License
rc-dropdown is released under the MIT license.
