diff --git a/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx index a438910be747c..77ba4b81d65ee 100644 --- a/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx +++ b/x-pack/plugins/runtime_fields/public/components/runtime_field_form/runtime_field_form.tsx @@ -33,7 +33,7 @@ export interface Props { onChange?: (state: FormState) => void; } -export const RuntimeFieldForm = ({ defaultValue, onChange, docsBaseUri }: Props) => { +const RuntimeFieldFormComp = ({ defaultValue, onChange, docsBaseUri }: Props) => { const { form } = useForm({ defaultValue, schema }); const { submit, isValid: isFormValid, isSubmitted } = form; @@ -144,3 +144,5 @@ export const RuntimeFieldForm = ({ defaultValue, onChange, docsBaseUri }: Props) ); }; + +export const RuntimeFieldForm = React.memo(RuntimeFieldFormComp);