From 68e5a72618c70632d490da9a3f3ac34cabb69fdb Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Sat, 28 Mar 2020 22:31:59 +0100 Subject: [PATCH 1/5] Increase export of users up to 5000 --- src/components/users.js | 45 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) 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={} > Date: Sun, 29 Mar 2020 20:59:54 +0200 Subject: [PATCH 2/5] Fix coding style --- src/components/users.js | 68 ++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/users.js b/src/components/users.js index b368c9b..9231905 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -21,41 +21,41 @@ import { } 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 + 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', - })} - - - + + {filters && cloneElement(filters, { + resource, + showFilter, + displayedFilters, + filterValues, + context: 'button', + })} + + + ); const UserFilter = props => ( From 067dbd3b8212f92278422b2126cd2eeb273f8fb6 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Sun, 29 Mar 2020 21:13:23 +0200 Subject: [PATCH 3/5] Fix coding style --- src/components/users.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/users.js b/src/components/users.js index 9231905..b5f2076 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -39,12 +39,13 @@ const ListActions = ({ ...rest }) => ( - {filters && cloneElement(filters, { - resource, - showFilter, - displayedFilters, - filterValues, - context: 'button', + {filters && + cloneElement(filters, { + resource, + showFilter, + displayedFilters, + filterValues, + context: "button", })} Date: Mon, 6 Apr 2020 12:56:34 +0200 Subject: [PATCH 4/5] Update user.js to fix error in resolve conflict --- src/components/users.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/users.js b/src/components/users.js index b35d171..7a64081 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -67,6 +67,7 @@ const ListActions = ({ maxResults={maxResults} /> +); const UserPagination = props => ( From 1764554ce94eff7a522f7d016750c1168302021f Mon Sep 17 00:00:00 2001 From: Michael Albert <37796947+awesome-michael@users.noreply.github.com> Date: Fri, 10 Jul 2020 15:29:58 +0200 Subject: [PATCH 5/5] Update users.js --- src/components/users.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/users.js b/src/components/users.js index 42a3263..be5b56a 100644 --- a/src/components/users.js +++ b/src/components/users.js @@ -118,6 +118,10 @@ const UserBulkActionButtons = props => { ); }; +const AvatarField = ({ source, className, record = {} }) => ( + +); + export const UserList = props => { const classes = useStyles(); return (