routes not exported base fixes

This commit is contained in:
Matthias Hannig 2018-08-03 14:51:45 +02:00
parent 61f659a59b
commit be393df354
2 changed files with 24 additions and 15 deletions

View File

@ -47,6 +47,10 @@
font-size: 90%;
color: #333;
margin-bottom: 1px;
a {
color: #aa0000;
}
}

View File

@ -91,12 +91,16 @@ class RoutesView extends React.Component {
}
componentDidUpdate(prevProps) {
const scrollAnchor = this.refs.scrollAnchor;
if (this.routesNeedFetch(prevProps)) {
this.dispatchFetchRoutes();
this.refs.scrollAnchor.scrollIntoView({
behaviour: "smooth",
block: "start",
});
if (scrollAnchor) {
scrollAnchor.scrollIntoView({
behaviour: "smooth",
block: "start",
});
}
}
}
@ -124,19 +128,20 @@ class RoutesView extends React.Component {
return (
<div className={`card routes-view ${name}`}>
<a name={name} id={name} ref="scrollAnchor" />
<div className="row">
<div className="col-md-6">
<RoutesHeader type={type} />
</div>
<div className="col-md-6">
<RoutesPaginationInfo page={state.page}
pageSize={state.pageSize}
totalPages={state.totalPages}
totalResults={state.totalResults} />
<div className="row">
<div className="col-md-6">
<a name={name} id={name} ref="scrollAnchor">
<RoutesHeader type={type} />
</a>
</div>
<div className="col-md-6">
<RoutesPaginationInfo page={state.page}
pageSize={state.pageSize}
totalPages={state.totalPages}
totalResults={state.totalResults} />
</div>
</div>
</div>
<RoutesTable type={type} routes={state.routes} />
<center>