From 0802745de7764d92bf722ffd6cbd77452d4ad968 Mon Sep 17 00:00:00 2001 From: Matteo Velludini Date: Wed, 15 Mar 2017 17:19:01 +0100 Subject: [PATCH 1/2] fixed #1563 catalog pagination --- web/client/components/catalog/Catalog.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/client/components/catalog/Catalog.jsx b/web/client/components/catalog/Catalog.jsx index d54138a675..74ffb53a8f 100644 --- a/web/client/components/catalog/Catalog.jsx +++ b/web/client/components/catalog/Catalog.jsx @@ -236,9 +236,9 @@ const Catalog = React.createClass({ setCatalogUrl(e) { this.setState({catalogURL: e.target.value}); }, - handlePage(mouseEvent, pageEvent) { - if (pageEvent && pageEvent.eventKey !== undefined) { - let start = ((pageEvent.eventKey - 1) * this.props.pageSize) + 1; + handlePage(mouseEvent) { + if (mouseEvent) { + let start = ((mouseEvent - 1) * this.props.pageSize) + 1; this.props.onSearch(this.props.format, this.getCatalogUrl(), start, this.props.pageSize, this.props.searchOptions.text); this.setState({ loading: true From 867f75a918870b6dd2d40b1b61eea85616089e6e Mon Sep 17 00:00:00 2001 From: Matteo Velludini Date: Wed, 15 Mar 2017 18:15:46 +0100 Subject: [PATCH 2/2] changed name to eventkey --- web/client/components/catalog/Catalog.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/client/components/catalog/Catalog.jsx b/web/client/components/catalog/Catalog.jsx index 74ffb53a8f..c5fa3a90b2 100644 --- a/web/client/components/catalog/Catalog.jsx +++ b/web/client/components/catalog/Catalog.jsx @@ -236,9 +236,9 @@ const Catalog = React.createClass({ setCatalogUrl(e) { this.setState({catalogURL: e.target.value}); }, - handlePage(mouseEvent) { - if (mouseEvent) { - let start = ((mouseEvent - 1) * this.props.pageSize) + 1; + handlePage(eventKey) { + if (eventKey) { + let start = ((eventKey - 1) * this.props.pageSize) + 1; this.props.onSearch(this.props.format, this.getCatalogUrl(), start, this.props.pageSize, this.props.searchOptions.text); this.setState({ loading: true