Skip to content

Commit

Permalink
add onchange to props for field input and bool
Browse files Browse the repository at this point in the history
  • Loading branch information
tim heller committed Apr 4, 2024
1 parent 1964143 commit fd4e865
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/npm-fastui/src/components/FormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface FormFieldInputProps extends FormFieldInput {
}

export const FormFieldInputComp: FC<FormFieldInputProps> = (props) => {
const { name, placeholder, required, htmlType, locked, autocomplete } = props
const { name, placeholder, required, htmlType, locked, autocomplete, onChange } = props

return (
<div className={useClassName(props)}>
Expand All @@ -40,6 +40,7 @@ export const FormFieldInputComp: FC<FormFieldInputProps> = (props) => {
placeholder={placeholder}
autoComplete={autocomplete}
aria-describedby={descId(props)}
onChange={onChange}
/>
<ErrorDescription {...props} />
</div>
Expand Down Expand Up @@ -78,7 +79,7 @@ interface FormFieldBooleanProps extends FormFieldBoolean {
}

export const FormFieldBooleanComp: FC<FormFieldBooleanProps> = (props) => {
const { name, required, locked } = props
const { name, required, locked, onChange } = props

return (
<div className={useClassName(props)}>
Expand All @@ -92,6 +93,7 @@ export const FormFieldBooleanComp: FC<FormFieldBooleanProps> = (props) => {
required={required}
disabled={locked}
aria-describedby={descId(props)}
onChange={onChange}
/>
<ErrorDescription {...props} />
</div>
Expand Down

0 comments on commit fd4e865

Please sign in to comment.