From fd4e865210ab08568a9a279400b20ed0fefd0d69 Mon Sep 17 00:00:00 2001 From: tim heller Date: Thu, 4 Apr 2024 14:55:48 +0100 Subject: [PATCH] add `onchange` to props for field input and bool --- src/npm-fastui/src/components/FormField.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/npm-fastui/src/components/FormField.tsx b/src/npm-fastui/src/components/FormField.tsx index d1b30c78..23614570 100644 --- a/src/npm-fastui/src/components/FormField.tsx +++ b/src/npm-fastui/src/components/FormField.tsx @@ -24,7 +24,7 @@ interface FormFieldInputProps extends FormFieldInput { } export const FormFieldInputComp: FC = (props) => { - const { name, placeholder, required, htmlType, locked, autocomplete } = props + const { name, placeholder, required, htmlType, locked, autocomplete, onChange } = props return (
@@ -40,6 +40,7 @@ export const FormFieldInputComp: FC = (props) => { placeholder={placeholder} autoComplete={autocomplete} aria-describedby={descId(props)} + onChange={onChange} />
@@ -78,7 +79,7 @@ interface FormFieldBooleanProps extends FormFieldBoolean { } export const FormFieldBooleanComp: FC = (props) => { - const { name, required, locked } = props + const { name, required, locked, onChange } = props return (
@@ -92,6 +93,7 @@ export const FormFieldBooleanComp: FC = (props) => { required={required} disabled={locked} aria-describedby={descId(props)} + onChange={onChange} />