From 83b22b486113b2581ebc0078e69e415ffbb5eb45 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 14 Aug 2025 18:51:32 +0300 Subject: [PATCH] chore(react/settings): allow combo to have any possible object structure --- apps/client/src/widgets/react/FormSelect.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/client/src/widgets/react/FormSelect.tsx b/apps/client/src/widgets/react/FormSelect.tsx index 1a13d1571..90ace2100 100644 --- a/apps/client/src/widgets/react/FormSelect.tsx +++ b/apps/client/src/widgets/react/FormSelect.tsx @@ -1,10 +1,12 @@ -interface FormSelectProps { +interface FormSelectProps { currentValue?: string; onChange(newValue: string): void; - values: { val: string, title: string }[]; + values: T[]; + keyProperty: keyof T; + titleProperty: keyof T; } -export default function FormSelect({ currentValue, values, onChange }: FormSelectProps) { +export default function FormSelect({ currentValue, values, onChange, keyProperty, titleProperty }: FormSelectProps) { return (