From d5eb4b9a730a0ecfa61a054e196fbbcee167b2ac Mon Sep 17 00:00:00 2001 From: grimsi <9295182+grimsi@users.noreply.github.com> Date: Tue, 20 May 2025 09:25:29 +0200 Subject: [PATCH] Fix small bug in ComboButton --- .../frontend/components/general/input/ComboButton.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gameyfin/src/main/frontend/components/general/input/ComboButton.tsx b/gameyfin/src/main/frontend/components/general/input/ComboButton.tsx index 26f3fb1..b23817f 100644 --- a/gameyfin/src/main/frontend/components/general/input/ComboButton.tsx +++ b/gameyfin/src/main/frontend/components/general/input/ComboButton.tsx @@ -26,7 +26,6 @@ export interface ComboButtonProps { export default function ComboButton({options, preferredOptionKey, description}: ComboButtonProps) { const [selectedOption, setSelectedOption] = useState(new Set([Object.keys(options)[0]])); - const [disabledOptions] = useState(getDisabledKeys(options)); const selectedOptionValue = Array.from(selectedOption)[0]; useEffect(() => { @@ -51,11 +50,7 @@ export default function ComboButton({options, preferredOptionKey, description}: setSelectedOption(new Set([keys.currentKey])); } - function getDisabledKeys(options: Record): string[] { - return Object.keys(options).filter(key => options[key].isDisabled); - } - - return ( + return options[selectedOptionValue] && (