From 1ca62ba2f55c8c38bd9db962930a2c15c924b773 Mon Sep 17 00:00:00 2001 From: MathieuG-P <40181755+Zagrios@users.noreply.github.com> Date: Sat, 10 Dec 2022 01:29:23 +0100 Subject: [PATCH] handle translation AND onChange reture string --- src/renderer/components/shared/bsm-select.component.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/shared/bsm-select.component.tsx b/src/renderer/components/shared/bsm-select.component.tsx index 5be4d8cd..8b9a87ba 100644 --- a/src/renderer/components/shared/bsm-select.component.tsx +++ b/src/renderer/components/shared/bsm-select.component.tsx @@ -1,14 +1,17 @@ import { ChangeEvent, CSSProperties } from "react" +import { useTranslation } from "renderer/hooks/use-translation.hook" type Props = { className?: string, style?: CSSProperties, options?: BsmSelectOption[], - onChange?: (value: any) => void + onChange?: (value: string) => void } export function BsmSelect({className, style, options, onChange}: Props) { + const t = useTranslation(); + const handleChange = (event: ChangeEvent) => { onChange?.(event.target.value); } @@ -16,7 +19,7 @@ export function BsmSelect({className, style, options, onChange}: Props) { return ( )