diff --git a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx index feb5cbc012..0f2b040814 100644 --- a/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureOverview/ManageTagsDialog/ManageTagsDialog.tsx @@ -51,11 +51,15 @@ export const ManageTagsDialog = ({ open, setOpen }: IManageTagsProps) => { const { updateFeatureTags, loading: featureLoading } = useFeatureApi(); const { tags, refetch, loading: tagsLoading } = useFeatureTags(featureId); const { setToastData } = useToast(); - const [tagType, setTagType] = useState({ - name: 'simple', - description: 'Simple tag to get you started', - icon: '', - }); + const initialTagType = + tagTypes && tagTypes.length > 0 + ? tagTypes[0] + : { + name: 'simple', + description: 'Simple tag to get you started', + icon: '', + }; + const [tagType, setTagType] = useState(initialTagType); const loading = featureLoading || tagsLoading;