diff --git a/src/components/VersionSelector/Option.tsx b/src/components/VersionSelector/Option.tsx index 693ae072..62b750fe 100644 --- a/src/components/VersionSelector/Option.tsx +++ b/src/components/VersionSelector/Option.tsx @@ -3,18 +3,18 @@ import { StyledLi, StyledOptionText, StyledPlaceholder } from './styled.elements import Checkmark from './CheckmarkSvg'; import { OptionProps } from './types'; -export const Option = ({ option, selected, onClick }: OptionProps) => { +export const Option = ({ option, value, selected, onClick }: OptionProps) => { const KEY_ENTER = 'ENTER'; const KEY_SPACE = 'SPACE'; const handleKeyPress = (event: React.KeyboardEvent) => { if (event.key === KEY_ENTER || event.key === KEY_SPACE) { - onClick(option); + onClick(value); } }; return ( - onClick(option)} onKeyPress={handleKeyPress} selected={selected}> + onClick(value)} onKeyPress={handleKeyPress} selected={selected}> {selected ? : } {option} diff --git a/src/components/VersionSelector/VersionSelector.tsx b/src/components/VersionSelector/VersionSelector.tsx index 63a7da89..924836db 100644 --- a/src/components/VersionSelector/VersionSelector.tsx +++ b/src/components/VersionSelector/VersionSelector.tsx @@ -59,7 +59,8 @@ const VersionSelectorComponent = ({