mirror of
https://github.com/UA-Fediland/synapse-admin.git
synced 2024-11-08 15:54:51 +00:00
Add more size options to pagination (#23)
This commit is contained in:
parent
965645874c
commit
445c7fc327
2 changed files with 12 additions and 2 deletions
|
@ -1,8 +1,12 @@
|
|||
import React from "react";
|
||||
import { Datagrid, List, TextField } from "react-admin";
|
||||
import { Datagrid, List, TextField, Pagination } from "react-admin";
|
||||
|
||||
const RoomPagination = props => (
|
||||
<Pagination {...props} rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />
|
||||
);
|
||||
|
||||
export const RoomList = props => (
|
||||
<List {...props}>
|
||||
<List {...props} pagination={<RoomPagination />}>
|
||||
<Datagrid>
|
||||
<TextField source="room_id" />
|
||||
<TextField source="name" />
|
||||
|
|
|
@ -23,8 +23,13 @@ import {
|
|||
ReferenceField,
|
||||
SelectInput,
|
||||
regex,
|
||||
Pagination,
|
||||
} from "react-admin";
|
||||
|
||||
const UserPagination = props => (
|
||||
<Pagination {...props} rowsPerPageOptions={[10, 25, 50, 100, 500, 1000]} />
|
||||
);
|
||||
|
||||
const UserFilter = props => (
|
||||
<Filter {...props}>
|
||||
<BooleanInput source="guests" alwaysOn />
|
||||
|
@ -42,6 +47,7 @@ export const UserList = props => (
|
|||
filters={<UserFilter />}
|
||||
filterDefaultValues={{ guests: true, deactivated: false }}
|
||||
bulkActionButtons={false}
|
||||
pagination={<UserPagination />}
|
||||
>
|
||||
<Datagrid rowClick="edit">
|
||||
<ReferenceField
|
||||
|
|
Loading…
Reference in a new issue