diff --git a/ui/v2.5/src/components/Groups/GroupDetails/GroupSubGroupsPanel.tsx b/ui/v2.5/src/components/Groups/GroupDetails/GroupSubGroupsPanel.tsx index 98e44ac88..5dfba0569 100644 --- a/ui/v2.5/src/components/Groups/GroupDetails/GroupSubGroupsPanel.tsx +++ b/ui/v2.5/src/components/Groups/GroupDetails/GroupSubGroupsPanel.tsx @@ -64,13 +64,6 @@ interface IGroupSubGroupsPanel { extraOperations?: IItemListOperation[]; } -const defaultFilter = (() => { - return new ListFilterModel(GQL.FilterMode.Groups, undefined, { - defaultSortBy: "sub_group_description", - defaultSortDir: GQL.SortDirectionEnum.Asc, - }); -})(); - export const GroupSubGroupsPanel: React.FC = PatchComponent( "GroupSubGroupsPanel", @@ -155,7 +148,6 @@ export const GroupSubGroupsPanel: React.FC = <> {modal} ListFilterModel; - defaultFilter?: ListFilterModel; view?: View; alterQuery?: boolean; } @@ -210,12 +209,8 @@ export const FilteredGroupList = PatchComponent( onMove, fromGroupId, otherOperations: providedOperations = [], - defaultFilter, } = props; - const withSidebar = view !== View.GroupSubGroups; - const filterable = view !== View.GroupSubGroups; - const sortable = true; // States const { @@ -230,7 +225,6 @@ export const FilteredGroupList = PatchComponent( useFilteredItemList({ filterStateProps: { filterMode: GQL.FilterMode.Groups, - defaultFilter, view, useURL: alterQuery, }, @@ -402,8 +396,6 @@ export const FilteredGroupList = PatchComponent( operationComponent={operations} view={view} zoomable - filterable={filterable} - sortable={sortable} /> ); - if (!withSidebar) { - return content; - } - return (
= ({ sortable = true, }) => { const filterOptions = filter.options; + // Something in the popper layout for groups.sub-groups tab to double calculates the offset + // causing the dropdown to be misaligned. Portal to document.body to fix this. + const menuPortalTarget = + typeof document !== "undefined" ? document.body : undefined; const { setDisplayMode, setZoom } = useFilterOperations({ filter, setFilter, @@ -142,6 +146,7 @@ export const FilteredListToolbar: React.FC = ({ filter={filter} onSetFilter={setFilter} view={view} + menuPortalTarget={menuPortalTarget} /> showEditFilter()}