From b658ddf5cf61b2bb9b93cb1a4ca716cd75e18bb4 Mon Sep 17 00:00:00 2001 From: sct Date: Thu, 4 Feb 2021 12:50:53 +0000 Subject: [PATCH] fix(ui): dont show bulk edit options on user list if there is only one user --- src/components/UserList/index.tsx | 36 +++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/UserList/index.tsx b/src/components/UserList/index.tsx index 096c05af1..aa98134d7 100644 --- a/src/components/UserList/index.tsx +++ b/src/components/UserList/index.tsx @@ -387,15 +387,17 @@ const UserList: React.FC = () => { - { - toggleAllUsers(); - }} - /> + {(data ?? []).length > 1 && ( + { + toggleAllUsers(); + }} + /> + )} {intl.formatMessage(messages.username)} {intl.formatMessage(messages.totalrequests)} @@ -404,13 +406,15 @@ const UserList: React.FC = () => { {intl.formatMessage(messages.created)} {intl.formatMessage(messages.lastupdated)} - + {(data ?? []).length > 1 && ( + + )}