Skip to content

Commit a3d18bb

Browse files
committed
Add type="button" to expand buttons to prevent form submission
Resolves #31.
1 parent 0f897da commit a3d18bb

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## v0.5.2 (TBD)
4+
5+
### Bug Fixes
6+
7+
* [#31]: Fix issue where expand buttons would submit a parent form
8+
39
## [v0.5.1](https://github.com/jakezatecky/react-checkbox-tree/compare/v0.5.0...v0.5.1) (2017-03-21)
410

511
### New Features

src/js/TreeNode.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ class TreeNode extends React.Component {
8282
}
8383

8484
return (
85-
<button aria-label="Toggle" className="rct-collapse rct-collapse-btn" title="Toggle" onClick={this.onExpand}>
85+
<button
86+
aria-label="Toggle"
87+
className="rct-collapse rct-collapse-btn"
88+
title="Toggle"
89+
type="button"
90+
onClick={this.onExpand}
91+
>
8692
{this.renderCollapseIcon()}
8793
</button>
8894
);

0 commit comments

Comments
 (0)