From 2a8b54114fb9b99e245bb63ea67e598674086735 Mon Sep 17 00:00:00 2001 From: agagancarczyk <4890675+agagancarczyk@users.noreply.github.com> Date: Wed, 7 Feb 2024 11:24:52 +0000 Subject: [PATCH] Removed duplicate refresh buttons (#26857) * fixed refresh btn for events Signed-off-by: Agnieszka Gancarczyk * cleanup Signed-off-by: Agnieszka Gancarczyk --------- Signed-off-by: Agnieszka Gancarczyk Co-authored-by: Agnieszka Gancarczyk --- .../components/dropdown-panel/DropdownPanel.tsx | 4 +++- js/apps/admin-ui/src/events/AdminEvents.tsx | 12 +----------- js/apps/admin-ui/src/events/EventsSection.tsx | 12 +----------- .../localization/EffectiveMessageBundles.tsx | 14 +++++--------- 4 files changed, 10 insertions(+), 32 deletions(-) diff --git a/js/apps/admin-ui/src/components/dropdown-panel/DropdownPanel.tsx b/js/apps/admin-ui/src/components/dropdown-panel/DropdownPanel.tsx index ffa7643c3a..b37951c187 100644 --- a/js/apps/admin-ui/src/components/dropdown-panel/DropdownPanel.tsx +++ b/js/apps/admin-ui/src/components/dropdown-panel/DropdownPanel.tsx @@ -8,6 +8,7 @@ type DropdownPanelProps = { children: React.ReactNode; setSearchDropdownOpen: (open: boolean) => void; searchDropdownOpen: boolean; + marginRight?: string; width: string; }; @@ -16,6 +17,7 @@ const DropdownPanel: React.FC = ({ children, setSearchDropdownOpen, searchDropdownOpen, + marginRight, width, }) => { const dropdownRef = useRef(null); @@ -52,7 +54,7 @@ const DropdownPanel: React.FC = ({ className="kc-dropdown-panel" onClick={() => setSearchDropdownOpen(!searchDropdownOpen)} aria-label={buttonText} - style={{ width }} + style={{ width, marginRight }} data-testid="dropdown-panel-btn" > {buttonText} diff --git a/js/apps/admin-ui/src/events/AdminEvents.tsx b/js/apps/admin-ui/src/events/AdminEvents.tsx index a03278f245..1ce83da9d1 100644 --- a/js/apps/admin-ui/src/events/AdminEvents.tsx +++ b/js/apps/admin-ui/src/events/AdminEvents.tsx @@ -187,10 +187,6 @@ export const AdminEvents = () => { setKey(key + 1); } - function refresh() { - commitFilters(); - } - const adminEventSearchFormDisplay = () => { return ( { buttonText={t("searchForAdminEvent")} setSearchDropdownOpen={setSearchDropdownOpen} searchDropdownOpen={searchDropdownOpen} + marginRight="2.5rem" width="15vw" >
{
- {Object.entries(activeFilters).length > 0 && ( diff --git a/js/apps/admin-ui/src/events/EventsSection.tsx b/js/apps/admin-ui/src/events/EventsSection.tsx index 8acc4c5057..effd659d0d 100644 --- a/js/apps/admin-ui/src/events/EventsSection.tsx +++ b/js/apps/admin-ui/src/events/EventsSection.tsx @@ -220,10 +220,6 @@ export default function EventsSection() { setKey(key + 1); } - function refresh() { - commitFilters(); - } - const userEventSearchFormDisplay = () => { return (
-
{Object.entries(activeFilters).length > 0 && ( diff --git a/js/apps/admin-ui/src/realm-settings/localization/EffectiveMessageBundles.tsx b/js/apps/admin-ui/src/realm-settings/localization/EffectiveMessageBundles.tsx index 92a4ab2938..3047bb3be9 100644 --- a/js/apps/admin-ui/src/realm-settings/localization/EffectiveMessageBundles.tsx +++ b/js/apps/admin-ui/src/realm-settings/localization/EffectiveMessageBundles.tsx @@ -202,7 +202,10 @@ export const EffectiveMessageBundles = ({ > - + {t("effectiveMessageBundlesDescription")} @@ -212,6 +215,7 @@ export const EffectiveMessageBundles = ({ buttonText={t("searchForEffectiveMessageBundles")} setSearchDropdownOpen={setSearchDropdownOpen} searchDropdownOpen={searchDropdownOpen} + marginRight="2.5rem" width="15vw" >
-
{Object.entries(activeFilters).length > 0 && (