From eeeda9fc043b6fab8c74ab2d29f1d4a47c1459da Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:41:24 +1100 Subject: [PATCH] Fix sidebar state issues --- .../src/components/Galleries/GalleryList.tsx | 143 +++++++++--------- 1 file changed, 74 insertions(+), 69 deletions(-) diff --git a/ui/v2.5/src/components/Galleries/GalleryList.tsx b/ui/v2.5/src/components/Galleries/GalleryList.tsx index 2135bc314..0edbb1cce 100644 --- a/ui/v2.5/src/components/Galleries/GalleryList.tsx +++ b/ui/v2.5/src/components/Galleries/GalleryList.tsx @@ -21,6 +21,7 @@ import { Sidebar, SidebarPane, SidebarPaneContent, + SidebarStateContext, useSidebarState, } from "../Shared/Sidebar"; import { useCloseEditDelete, useFilterOperations } from "../List/util"; @@ -234,6 +235,8 @@ export const FilteredGalleryList = (props: IGalleryList) => { const { showSidebar, setShowSidebar, + sectionOpen, + setSectionOpen, loading: sidebarStateLoading, } = useSidebarState(view); @@ -414,81 +417,83 @@ export const FilteredGalleryList = (props: IGalleryList) => { > {modal} - - setShowSidebar(false)}> - setShowSidebar(false)} - count={cachedResult.loading ? undefined : totalCount} - focus={searchFocus} - /> - - setShowSidebar(!showSidebar)} - > - - - showEditFilter(c.criterionOption.type)} - onRemoveCriterion={removeCriterion} - onRemoveAll={clearAllCriteria} - /> - -
- setFilter(filter.changePage(page))} + + + setShowSidebar(false)}> + setShowSidebar(false)} + count={cachedResult.loading ? undefined : totalCount} + focus={searchFocus} /> - + setShowSidebar(!showSidebar)} + > + -
- - showEditFilter(c.criterionOption.type)} + onRemoveCriterion={removeCriterion} + onRemoveAll={clearAllCriteria} /> - - {totalCount > filter.itemsPerPage && ( -
-
- -
+
+ setFilter(filter.changePage(page))} + /> +
- )} - - + + + + + + {totalCount > filter.itemsPerPage && ( +
+
+ +
+
+ )} + + +
); };