From e41d1b4818b800d48fc06fa20911c02da3f57fe3 Mon Sep 17 00:00:00 2001 From: Uruk Date: Mon, 12 Jan 2026 09:40:50 +0100 Subject: [PATCH] fix: hide tags dropdown when no tags are available Prevents the tags selection UI from rendering when the service has no tags configured. Wraps the tags dropdown component in a conditional check to only display when tags exist in the default service details, avoiding empty or broken UI states. --- components/seerr/RequestModal.tsx | 55 ++++++++++++++++--------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/components/seerr/RequestModal.tsx b/components/seerr/RequestModal.tsx index 97e04619..53d23765 100644 --- a/components/seerr/RequestModal.tsx +++ b/components/seerr/RequestModal.tsx @@ -372,32 +372,35 @@ const RequestModal = forwardRef< /> - - - {t("seerr.tags")} - - - - {requestOverrides.tags - ? defaultServiceDetails.tags - .filter((t) => - requestOverrides.tags!.includes(t.id), - ) - .map((t) => t.label) - .join(", ") || - defaultTags.map((t) => t.label).join(", ") - : defaultTags.map((t) => t.label).join(", ")} - - - } - title={t("seerr.tags")} - open={tagsOpen} - onOpenChange={setTagsOpen} - /> - + {defaultServiceDetails?.tags && + defaultServiceDetails.tags.length > 0 && ( + + + {t("seerr.tags")} + + + + {requestOverrides.tags + ? defaultServiceDetails.tags + .filter((t) => + requestOverrides.tags!.includes(t.id), + ) + .map((t) => t.label) + .join(", ") || + defaultTags.map((t) => t.label).join(", ") + : defaultTags.map((t) => t.label).join(", ")} + + + } + title={t("seerr.tags")} + open={tagsOpen} + onOpenChange={setTagsOpen} + /> + + )}