diff --git a/catalog-rest-service/src/main/resources/ui/src/components/dropdown/DropDownList.tsx b/catalog-rest-service/src/main/resources/ui/src/components/dropdown/DropDownList.tsx index 9272183e3e2..211f41aa674 100644 --- a/catalog-rest-service/src/main/resources/ui/src/components/dropdown/DropDownList.tsx +++ b/catalog-rest-service/src/main/resources/ui/src/components/dropdown/DropDownList.tsx @@ -70,6 +70,15 @@ const DropDownList: FunctionComponent = ({ ); }; + const setCurrentTabOnMount = () => { + const owner = dropDownList.find((l) => l.value === value); + if (owner) { + const index = listGroups.indexOf(owner.group as string); + + setActiveTab(index >= 0 ? index + 1 : 1); + } + }; + useEffect(() => { setSearchText(searchString); }, [searchString]); @@ -100,6 +109,7 @@ const DropDownList: FunctionComponent = ({ useEffect(() => { isMounted.current = true; + setCurrentTabOnMount(); }, []); return (