diff --git a/.changeset/khaki-shrimps-move.md b/.changeset/khaki-shrimps-move.md new file mode 100644 index 0000000000..24e0f999e7 --- /dev/null +++ b/.changeset/khaki-shrimps-move.md @@ -0,0 +1,5 @@ +--- +"@salt-ds/core": patch +--- + +Fixed `onBlur` and `onFocus` not working with FormField. diff --git a/packages/core/src/form-field/FormField.tsx b/packages/core/src/form-field/FormField.tsx index cf1af4a675..5f7bb4136b 100644 --- a/packages/core/src/form-field/FormField.tsx +++ b/packages/core/src/form-field/FormField.tsx @@ -43,7 +43,7 @@ export interface FormFieldProps const withBaseName = makePrefixer("saltFormField"); -export const FormField = forwardRef( +export const FormField = forwardRef( ( { children, @@ -52,13 +52,11 @@ export const FormField = forwardRef( id: idProp, labelPlacement = "top", necessity, - onBlur, - onFocus, readOnly = false, validationStatus, ...restProps - }: FormFieldProps, - ref: ForwardedRef + }, + ref ) => { const targetWindow = useWindow(); useComponentCssInjection({