Skip to content

Commit

Permalink
feat: add prop id for Panel
Browse files Browse the repository at this point in the history
close #69
  • Loading branch information
shepherdwind committed Jun 6, 2017
1 parent 61686d3 commit 5f98306
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# History
----

## 1.7.6 2017-06-06

- Add prop id for Panel [#69](https://github.com/react-component/collapse/issues/69)

## 1.7.4 2017-05-16

- Add prop disabled [!71](https://github.com/react-component/collapse/pull/71)
Expand Down
2 changes: 1 addition & 1 deletion examples/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Test extends React.Component {
items.push(
<Panel header={`This is panel header 4`} key="4">
<Collapse defaultActiveKey="1">
<Panel header={`This is panel nest panel`} key="1">
<Panel header={`This is panel nest panel`} key="1" id="header-test">
<p>{text}</p>
</Panel>
</Collapse>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-collapse",
"version": "1.7.5",
"version": "1.7.6",
"description": "rc-collapse ui component for react",
"keywords": [
"react",
Expand Down
4 changes: 3 additions & 1 deletion src/Panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CollapsePanel extends Component {
render() {
const {
className,
id,
style,
prefixCls,
header,
Expand All @@ -33,7 +34,7 @@ class CollapsePanel extends Component {
[`${prefixCls}-item-disabled`]: disabled,
}, className);
return (
<div className={itemCls} style={style}>
<div className={itemCls} style={style} id={id}>
<div
className={headerCls}
onClick={this.handleItemClick.bind(this)}
Expand Down Expand Up @@ -67,6 +68,7 @@ CollapsePanel.propTypes = {
PropTypes.string,
PropTypes.object,
]),
id: PropTypes.string,
children: PropTypes.any,
openAnimation: PropTypes.object,
prefixCls: PropTypes.string,
Expand Down

0 comments on commit 5f98306

Please sign in to comment.