From 218cf42bb25618c1eea6bc776b0272aaca0bfee0 Mon Sep 17 00:00:00 2001 From: Misha Date: Thu, 9 Mar 2017 16:34:44 +0200 Subject: [PATCH] removed form tag from pagination component to avoid nested forms error (#119) --- src/pagination.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pagination.js b/src/pagination.js index 6200ef3..608d93d 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -66,9 +66,7 @@ export default React.createClass({
{this.props.pageText} {showPageJump ? ( -
+
{ @@ -81,8 +79,13 @@ export default React.createClass({ }} value={this.state.page === '' ? '' : this.state.page + 1} onBlur={this.applyPage} + onKeyPress={e => { + if (e.which === 13 || e.keyCode === 13) { + this.applyPage() + } + }} /> - +
) : ( {page + 1} )} {this.props.ofText} {pages}