From aa8e46f62753548f75925b7e3e251cc106cf3796 Mon Sep 17 00:00:00 2001 From: Irakli Chalagashvili Date: Tue, 16 Jan 2024 21:16:04 +0400 Subject: [PATCH] ENG-5428 fix the roles ux for formik regression --- src/ui/common/formik-field/RenderTextInput.js | 2 ++ src/ui/roles/common/RoleForm.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ui/common/formik-field/RenderTextInput.js b/src/ui/common/formik-field/RenderTextInput.js index c41431a86..1287c2d03 100644 --- a/src/ui/common/formik-field/RenderTextInput.js +++ b/src/ui/common/formik-field/RenderTextInput.js @@ -48,6 +48,8 @@ export const RenderTextInputBody = ({ field.onChange(e); if (onChange) { onChange(e); + } else if (restProps && restProps.onChange) { + restProps.onChange(e); } }} /> diff --git a/src/ui/roles/common/RoleForm.js b/src/ui/roles/common/RoleForm.js index 8524e7c26..87b6263e3 100644 --- a/src/ui/roles/common/RoleForm.js +++ b/src/ui/roles/common/RoleForm.js @@ -194,6 +194,7 @@ RoleFormBody.defaultProps = { const RoleForm = withFormik({ enableReinitialize: true, + validateOnMount: true, mapPropsToValues: ({ initialValues }) => initialValues, validationSchema: ({ intl }) => ( Yup.object().shape({