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] && (