From 6a85124749ca44018074179a7f3983ba136b285e Mon Sep 17 00:00:00 2001 From: Favour Ohans Date: Sat, 17 Aug 2024 07:25:30 +0100 Subject: [PATCH] Fix compatibility table issue --- .../components/compatibility/CompatibilitySelect.tsx | 7 ++++--- v2/src/components/compatibility/index.tsx | 11 ++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/v2/src/components/compatibility/CompatibilitySelect.tsx b/v2/src/components/compatibility/CompatibilitySelect.tsx index 66590c168..1aeaa6f69 100644 --- a/v2/src/components/compatibility/CompatibilitySelect.tsx +++ b/v2/src/components/compatibility/CompatibilitySelect.tsx @@ -8,17 +8,18 @@ export type CompatibilitySelectOptionType = { type CompatibilitySelectProps = { options: CompatibilitySelectOptionType[]; setOption: (value: CompatibilitySelectOptionType) => void; + selectedOption: CompatibilitySelectOptionType|undefined disabled?: boolean; }; -export default function CompatibilitySelect({ setOption, options, disabled = false }: CompatibilitySelectProps) { +export default function CompatibilitySelect({ setOption, options, selectedOption, disabled = false }: CompatibilitySelectProps) { function handleChange(e: React.ChangeEvent) { const selectedOption = options.find(option => option.id === e.currentTarget.value)!; setOption(selectedOption); } return ( - + {options.map(option => { return (