diff --git a/packages/app-headless-cms/src/components/Form/LayoutRenderComponent/fields/Input.tsx b/packages/app-headless-cms/src/components/Form/LayoutRenderComponent/fields/Input.tsx index d6a4ae6b38b..c2c7180244d 100644 --- a/packages/app-headless-cms/src/components/Form/LayoutRenderComponent/fields/Input.tsx +++ b/packages/app-headless-cms/src/components/Form/LayoutRenderComponent/fields/Input.tsx @@ -1,8 +1,8 @@ import * as React from "react"; import { I18NValue } from "@webiny/app-i18n/components"; -import HelperMessage from "../components/HelperMessage"; import { CmsContentModelModelField } from "@webiny/app-headless-cms/types"; import { BindComponentRenderProp } from "@webiny/form"; +import { Input as UiInput } from "@webiny/ui/Input"; type Props = { type?: string; @@ -11,39 +11,14 @@ type Props = { }; const Input = (props: Props) => { - const { onChange, value, validation, validate } = props.bind; - - // @ts-ignore - const onBlur = (e: SyntheticInputEvent) => { - if (validate) { - // Since we are accessing event in an async operation, we need to persist it. - // See https://reactjs.org/docs/events.html#event-pooling. - e.persist(); - validate(); - } - }; - return ( -
- - onChange(e.target.value)} - value={value} - placeholder={I18NValue(props.field.placeholderText)} - type={props.type} - name={props.field.fieldId} - id={props.field.fieldId} - className="webiny-fb-form-field__input" - /> - } - /> -
+ ); };