From f6438c70fbe3a85296050b4321e26b9f81ce7704 Mon Sep 17 00:00:00 2001 From: Brent Hoover Date: Thu, 29 Jun 2017 06:21:49 +0800 Subject: [PATCH] Fix linting problems introduced in new SortableTable (#2505) --- .../sortableTableComponents/pagination.js | 36 +++++++++---------- .../client/settings/shippoTableColumn.js | 3 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/imports/plugins/core/ui/client/components/table/sortableTableComponents/pagination.js b/imports/plugins/core/ui/client/components/table/sortableTableComponents/pagination.js index 403f69bfe3a..a6b2b8e22e8 100644 --- a/imports/plugins/core/ui/client/components/table/sortableTableComponents/pagination.js +++ b/imports/plugins/core/ui/client/components/table/sortableTableComponents/pagination.js @@ -70,25 +70,25 @@ class SortableTablePagination extends Component { {this.props.pageText}{" "} {showPageJump ?
- { - const val = e.target.value; + { + const val = e.target.value; const page = val - 1; // eslint-disable-line - if (val === "") { - return this.setState({ page: val }); - } - this.setState({ page: this.getSafePage(page) }); - }} - value={this.state.page === "" ? "" : this.state.page + 1} - onBlur={this.applyPage} - onKeyPress={e => { - if (e.which === 13 || e.keyCode === 13) { - this.applyPage(); - } - }} - /> -
+ if (val === "") { + return this.setState({ page: val }); + } + this.setState({ page: this.getSafePage(page) }); + }} + 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 || 1} diff --git a/imports/plugins/included/shippo/client/settings/shippoTableColumn.js b/imports/plugins/included/shippo/client/settings/shippoTableColumn.js index 673ab28657b..b85748a62f3 100644 --- a/imports/plugins/included/shippo/client/settings/shippoTableColumn.js +++ b/imports/plugins/included/shippo/client/settings/shippoTableColumn.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from "react"; +import React, { Component } from "react"; +import PropTypes from "prop-types"; import { Icon } from "/imports/plugins/core/ui/client/components"; class EmailTableColumn extends Component {