From d7b154b656e3981b57f30675c7b4f72df8de4d40 Mon Sep 17 00:00:00 2001 From: Christie Molloy Date: Tue, 13 Oct 2020 17:06:58 -0400 Subject: [PATCH] format --- src/groups/GroupsCreateModal.tsx | 7 ++- src/groups/GroupsList.tsx | 5 ++- src/groups/GroupsSection.tsx | 77 +++++++++++++++++--------------- 3 files changed, 49 insertions(+), 40 deletions(-) diff --git a/src/groups/GroupsCreateModal.tsx b/src/groups/GroupsCreateModal.tsx index 311f7603a1..22660c7790 100644 --- a/src/groups/GroupsCreateModal.tsx +++ b/src/groups/GroupsCreateModal.tsx @@ -29,7 +29,7 @@ export const GroupsCreateModal = ({ setIsCreateModalOpen, createGroupName, setCreateGroupName, - refresh + refresh, }: GroupsCreateModalProps) => { const { t } = useTranslation("groups"); const httpClient = useContext(HttpClientContext)!; @@ -53,7 +53,10 @@ export const GroupsCreateModal = ({ refresh(); addAlert(t("groupCreated"), AlertVariant.success); } catch (error) { - addAlert(`${t("couldNotCreateGroup")} ': '${error}'`, AlertVariant.danger); + addAlert( + `${t("couldNotCreateGroup")} ': '${error}'`, + AlertVariant.danger + ); } } }; diff --git a/src/groups/GroupsList.tsx b/src/groups/GroupsList.tsx index 773bb84302..f612b44ae9 100644 --- a/src/groups/GroupsList.tsx +++ b/src/groups/GroupsList.tsx @@ -80,7 +80,10 @@ export const GroupsList = ({ list, refresh }: GroupsListProps) => { }, { title: t("common:Delete"), - onClick: async (_: React.MouseEvent, rowId: number) => { + onClick: async ( + _: React.MouseEvent, + rowId: number + ) => { try { await httpClient.doDelete( `/admin/realms/${realm}/groups/${list![rowId].id}` diff --git a/src/groups/GroupsSection.tsx b/src/groups/GroupsSection.tsx index 99ab7d7d8a..6fc2375f06 100644 --- a/src/groups/GroupsSection.tsx +++ b/src/groups/GroupsSection.tsx @@ -96,43 +96,46 @@ export const GroupsSection = () => { {rawData ? ( <> - - - - - } - isOpen={isKebabOpen} - isPlain - dropdownItems={[ - - {t("delete")} - , - ]} - /> - - - } - > - - - - + inputGroupName="groupsToolbarTextInput" + inputGroupPlaceholder={t("searchGroups")} + inputGroupOnChange={filterGroups} + toolbarItem={ + <> + + + + + } + isOpen={isKebabOpen} + isPlain + dropdownItems={[ + + {t("delete")} + , + ]} + /> + + + } + > + + + + ) : (