rc-collapse
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -22,7 +22,4 @@ 'use strict'; | ||
var Collapse = (0, _react.createClass)({ | ||
statics: { | ||
Panel: _Panel2['default'] | ||
}, | ||
propTypes: { | ||
children: _react.PropTypes.any, | ||
prefixCls: _react.PropTypes.string, | ||
@@ -36,2 +33,6 @@ activeKey: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.arrayOf(_react.PropTypes.string)]), | ||
statics: { | ||
Panel: _Panel2['default'] | ||
}, | ||
getDefaultProps: function getDefaultProps() { | ||
@@ -70,7 +71,7 @@ return { | ||
handleClickItem: function handleClickItem(key) { | ||
onClickItem: function onClickItem(key) { | ||
var _this = this; | ||
return function () { | ||
var activeKey = _this._getActivityKey(); | ||
var activeKey = _this.getActivityKey(); | ||
if (_this.props.accordion) { | ||
@@ -96,3 +97,3 @@ _this.setState({ | ||
_getActivityKey: function _getActivityKey() { | ||
getActivityKey: function getActivityKey() { | ||
var activeKey = this.state.activeKey; | ||
@@ -114,3 +115,3 @@ var accordion = this.props.accordion; | ||
var activeKey = this._getActivityKey(); | ||
var activeKey = this.getActivityKey(); | ||
var _props2 = this.props; | ||
@@ -138,3 +139,3 @@ var prefixCls = _props2.prefixCls; | ||
children: child.props.children, | ||
onItemClick: _this2.handleClickItem(key).bind(_this2) | ||
onItemClick: _this2.onClickItem(key).bind(_this2) | ||
}; | ||
@@ -141,0 +142,0 @@ |
@@ -25,2 +25,3 @@ 'use strict'; | ||
propTypes: { | ||
children: _react.PropTypes.any, | ||
openAnimation: _react.PropTypes.object, | ||
@@ -33,6 +34,2 @@ prefixCls: _react.PropTypes.string, | ||
getInitialState: function getInitialState() { | ||
return { isActive: this.props.isActive }; | ||
}, | ||
getDefaultProps: function getDefaultProps() { | ||
@@ -45,2 +42,6 @@ return { | ||
getInitialState: function getInitialState() { | ||
return { isActive: this.props.isActive }; | ||
}, | ||
handleItemClick: function handleItemClick() { | ||
@@ -47,0 +48,0 @@ this.props.onItemClick(); |
{ | ||
"name": "rc-collapse", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "rc-collapse ui component for react", | ||
@@ -13,10 +13,10 @@ "keywords": [ | ||
], | ||
"homepage": "http://github.com/react-component/rc-collapse", | ||
"homepage": "http://github.com/react-component/collapse", | ||
"author": "eward.song@gmail.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "git@github.com:react-component/rc-collapse.git" | ||
"url": "git@github.com:react-component/collapse.git" | ||
}, | ||
"bugs": { | ||
"url": "http://github.com/react-component/rc-collapse/issues" | ||
"url": "http://github.com/react-component/collapse/issues" | ||
}, | ||
@@ -51,2 +51,3 @@ "licenses": "MIT", | ||
"react-dom":"0.14.x", | ||
"react-addons-test-utils": "0.14.x", | ||
"string.prototype.repeat": "^0.2.0" | ||
@@ -53,0 +54,0 @@ }, |
@@ -36,7 +36,7 @@ # rc-collapse | ||
## Feature | ||
## Features | ||
* support ie8,ie8+,chrome,firefox,safari | ||
## install | ||
## Install | ||
@@ -104,7 +104,7 @@ [![rc-collapse](https://nodei.co/npm/rc-collapse.png)](https://npmjs.org/package/rc-collapse) | ||
If accordion is null or false, every panel open, will not close other panel. | ||
`activekey` should be an array. string will work fine, activekey will be an | ||
array, and the only item is the activeKey string provided; | ||
If `accordion` is null or false, every panel can open. Opening another panel will not close any of the other panels | ||
`activekey` should be an array, a string will work fine, activekey will be an | ||
array, and the only item is the activeKey string provided. | ||
If accordion is true, only on panel can be active. | ||
If `accordion` is true, only one panel can be open. Opening any one panel will cause the previously opened panel to close. | ||
`activekey` should be an string, but array is support too, just use the first | ||
@@ -138,3 +138,3 @@ item. | ||
If no key provide, key value will be the panel index. | ||
If `key` is not provided, the panel's index will be used instead. | ||
@@ -141,0 +141,0 @@ ## Test Case |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
15066
297
0
0
0
9