Increase export of users up to 5000

This commit is contained in:
dklimpel 2020-03-28 22:31:59 +01:00
parent 7eeb60539f
commit 68e5a72618

View File

@ -1,4 +1,4 @@
import React from "react";
import React, { cloneElement } from "react";
import {
Datagrid,
Create,
@ -14,8 +14,50 @@ import {
TextInput,
ReferenceField,
regex,
CreateButton,
ExportButton,
TopToolbar,
sanitizeListRestProps,
} from "react-admin";
const ListActions = ({
currentSort,
className,
resource,
filters,
displayedFilters,
exporter, // you can hide ExportButton if exporter = (null || false)
filterValues,
permanentFilter,
hasCreate, // you can hide CreateButton if hasCreate = false
basePath,
selectedIds,
onUnselectItems,
showFilter,
maxResults,
total,
...rest
}) => (
<TopToolbar className={className} {...sanitizeListRestProps(rest)}>
{filters && cloneElement(filters, {
resource,
showFilter,
displayedFilters,
filterValues,
context: 'button',
})}
<CreateButton basePath={basePath} />
<ExportButton
disabled={total === 0}
resource={resource}
sort={currentSort}
filter={{ ...filterValues, ...permanentFilter }}
exporter={exporter}
maxResults={maxResults}
/>
</TopToolbar>
);
const UserFilter = props => (
<Filter {...props}>
<BooleanInput source="guests" alwaysOn />
@ -33,6 +75,7 @@ export const UserList = props => (
filters={<UserFilter />}
filterDefaultValues={{ guests: true, deactivated: false }}
bulkActionButtons={false}
actions={<ListActions maxResults={10000} />}
>
<Datagrid rowClick="edit">
<ReferenceField