mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
scroll page to top on pagination
This commit is contained in:
parent
59f131f788
commit
1c470203b7
@ -14,8 +14,7 @@ let GlobalNotification = React.createClass({
|
||||
getInitialState() {
|
||||
return mergeOptions(
|
||||
{
|
||||
containerWidth: 0,
|
||||
type: 'success'
|
||||
containerWidth: 0
|
||||
},
|
||||
this.extractFirstElem(GlobalNotificationStore.getState().notificationQue)
|
||||
);
|
||||
@ -93,6 +92,7 @@ let GlobalNotification = React.createClass({
|
||||
|
||||
}
|
||||
|
||||
if(this.state.message) {
|
||||
switch(this.state.message.type) {
|
||||
case 'success':
|
||||
textClass = 'ascribe-global-notification-success';
|
||||
@ -103,6 +103,8 @@ let GlobalNotification = React.createClass({
|
||||
default:
|
||||
console.warn('Could not find a matching type in global_notification.js');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div ref="notificationWrapper">
|
||||
|
@ -110,8 +110,7 @@ let Header = React.createClass({
|
||||
toggleNavKey={0}
|
||||
fixedTop={true}>
|
||||
<CollapsibleNav eventKey={0}>
|
||||
<Nav navbar left>
|
||||
</Nav>
|
||||
<Nav navbar left />
|
||||
<Nav navbar right>
|
||||
<HeaderNotificationDebug show={false}/>
|
||||
{addNewWork}
|
||||
|
@ -47,6 +47,7 @@ let PieceList = React.createClass({
|
||||
},
|
||||
|
||||
paginationGoToPage(page) {
|
||||
document.body.scrollTop = document.documentElement.scrollTop = 0;
|
||||
return () => PieceListActions.fetchPieceList(page, this.state.pageSize,
|
||||
this.state.search, this.state.orderBy,
|
||||
this.state.orderAsc);
|
||||
|
Loading…
Reference in New Issue
Block a user