diff --git a/src/components/users.js b/src/components/users.js index d92041c..c65cd12 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -1,4 +1,4 @@ -import React, { Fragment } from "react"; +import React, { cloneElement, Fragment } from "react"; import Avatar from "@material-ui/core/Avatar"; import PersonPinIcon from "@material-ui/icons/PersonPin"; import ContactMailIcon from "@material-ui/icons/ContactMail"; @@ -30,6 +30,10 @@ import { regex, useTranslate, Pagination, + CreateButton, + ExportButton, + TopToolbar, + sanitizeListRestProps, } from "react-admin"; import { ServerNoticeButton, ServerNoticeBulkButton } from "./ServerNotices"; import { makeStyles } from "@material-ui/core/styles"; @@ -46,6 +50,45 @@ const useStyles = makeStyles({ }, }); +const UserListActions = ({ + 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 +}) => ( + + {filters && + cloneElement(filters, { + resource, + showFilter, + displayedFilters, + filterValues, + context: "button", + })} + + + +); + const UserPagination = props => ( ); @@ -86,6 +129,7 @@ export const UserList = props => { {...props} filters={} filterDefaultValues={{ guests: true, deactivated: false }} + actions={} bulkActionButtons={} pagination={} >