diff --git a/src/components/users.js b/src/components/users.js index 068b59e..b368c9b 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -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 +}) => ( + + {filters && cloneElement(filters, { + resource, + showFilter, + displayedFilters, + filterValues, + context: 'button', + })} + + + +); + const UserFilter = props => ( @@ -33,6 +75,7 @@ export const UserList = props => ( filters={} filterDefaultValues={{ guests: true, deactivated: false }} bulkActionButtons={false} + actions={} >