Skip to content

Commit

Permalink
SFO-7131. Set 'type' for Button-toggler to prevent submit when accord…
Browse files Browse the repository at this point in the history
…ion is used inside a form
  • Loading branch information
eirikv committed Sep 19, 2017
1 parent 99de35a commit e6bf853
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v2.0.4
Set `type="button"` for Button-toggler to prevent submit when accordion is used inside a form.

## v.2.0.3
* Use PropTypes from prop-types package

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": "ffe-accordion-react",
"version": "2.0.3",
"version": "2.0.4",
"main": "lib/index.js",
"scripts": {
"build": "babel -d lib/. --ignore=*.test.js src/. && npm run example",
Expand Down
1 change: 1 addition & 0 deletions src/accordion-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class AccordionItem extends Component {
id={ `tab-${uuid}-${index}` }
onClick={ this.onClick }
role="tab"
type="button"
>
<Chevron className={ createClasses('ffe-accordion-item__icon', isOpen, type) } />
{ children }
Expand Down

0 comments on commit e6bf853

Please sign in to comment.