Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

Commit 4e8efc1

Browse files
author
rnicholus
committed
fix(buttons): ensure buttons don't submit forms
fixes #120
1 parent b0c0f80 commit 4e8efc1

5 files changed

Lines changed: 5 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-fine-uploader",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"license": "MIT",
55
"description": "React UI components for using Fine Uploader in a React-based project.",
66
"author": {

src/cancel-button.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class CancelButton extends Component {
5656
className={ `react-fine-uploader-cancel-button ${this.props.className || ''}` }
5757
disabled={ !this.state.cancelable }
5858
onClick={ this.state.cancelable && this._onClick }
59+
type='button'
5960
{ ...elementProps }
6061
>
6162
{ content }

src/delete-button.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class DeleteButton extends Component {
6666
className={ `react-fine-uploader-delete-button ${this.props.className || ''}` }
6767
disabled={ !this.state.deletable || this.state.deleting }
6868
onClick={ this.state.deletable && !this.state.deleting && this._onClick }
69+
type='button'
6970
{ ...elementProps }
7071
>
7172
{ content }

src/pause-resume-button.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ class PauseResumeButton extends Component {
9797
className={ `react-fine-uploader-pause-resume-button ${getButtonClassName(this.state)} ${this.props.className || ''}` }
9898
disabled={ !this.state.pausable && !this.state.resumable }
9999
onClick={ this._onClick }
100+
type='button'
100101
{ ...elementProps }
101102
>
102103
{ getButtonContent(this.state, this.props) }

src/retry-button.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class RetryButton extends Component {
6868
className={ `react-fine-uploader-retry-button ${this.props.className || ''}` }
6969
disabled={ !this.state.retryable }
7070
onClick={ this.state.retryable && this._onClick }
71+
type='button'
7172
{ ...elementProps }
7273
>
7374
{ content }

0 commit comments

Comments
 (0)