mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
[system admin] improved pagination for all (#4404)
* [system admin] improved pagination for all * [paginator] show 'current page' * redesigned paginator * [pagination] cleanup
This commit is contained in:
@@ -69,7 +69,6 @@ class Content extends Component {
|
||||
gotoNextPage={this.getNextPage}
|
||||
currentPage={currentPage}
|
||||
hasNextPage={hasNextPage}
|
||||
canResetPerPage={true}
|
||||
curPerPage={perPage}
|
||||
resetPerPage={this.props.resetPerPage}
|
||||
/>
|
||||
@@ -124,7 +123,7 @@ class FileAccessLogs extends Component {
|
||||
loading: true,
|
||||
errorMsg: '',
|
||||
logList: [],
|
||||
perPage: 100,
|
||||
perPage: 25,
|
||||
currentPage: 1,
|
||||
hasNextPage: false,
|
||||
isExportExcelDialogOpen: false,
|
||||
@@ -137,7 +136,14 @@ class FileAccessLogs extends Component {
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
this.getLogsByPage(this.initPage);
|
||||
let urlParams = (new URL(window.location)).searchParams;
|
||||
const { currentPage, perPage } = this.state;
|
||||
this.setState({
|
||||
perPage: parseInt(urlParams.get('per_page') || perPage),
|
||||
currentPage: parseInt(urlParams.get('page') || currentPage)
|
||||
}, () => {
|
||||
this.getLogsByPage(this.state.currentPage);
|
||||
});
|
||||
}
|
||||
|
||||
getLogsByPage = (page) => {
|
||||
|
Reference in New Issue
Block a user