From b7b20fb214acc7e756360a081bb801afe16af775 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Thu, 12 Nov 2020 16:11:54 -0300 Subject: [PATCH 1/1] 15685: Sets dialog forms to get immediate validation feedback. Surprinsingly, this setting is off by default: https://redux-form.com/7.4.2/docs/api/reduxform.md/#-code-touchonchange-boolean-code-optional- ...so validations only happened after the first field blur event. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- src/views-components/dialog-forms/update-collection-dialog.ts | 1 + src/views-components/rename-file-dialog/rename-file-dialog.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/views-components/dialog-forms/update-collection-dialog.ts b/src/views-components/dialog-forms/update-collection-dialog.ts index cfa52639..021a335b 100644 --- a/src/views-components/dialog-forms/update-collection-dialog.ts +++ b/src/views-components/dialog-forms/update-collection-dialog.ts @@ -12,6 +12,7 @@ import { updateCollection } from "~/store/workbench/workbench-actions"; export const UpdateCollectionDialog = compose( withDialog(COLLECTION_UPDATE_FORM_NAME), reduxForm({ + touchOnChange: true, form: COLLECTION_UPDATE_FORM_NAME, onSubmit: (data, dispatch) => { dispatch(updateCollection(data)); diff --git a/src/views-components/rename-file-dialog/rename-file-dialog.tsx b/src/views-components/rename-file-dialog/rename-file-dialog.tsx index 9fbf6c9c..98147acc 100644 --- a/src/views-components/rename-file-dialog/rename-file-dialog.tsx +++ b/src/views-components/rename-file-dialog/rename-file-dialog.tsx @@ -17,6 +17,7 @@ export const RenameFileDialog = compose( withDialog(RENAME_FILE_DIALOG), reduxForm({ form: RENAME_FILE_DIALOG, + touchOnChange: true, onSubmit: (data: { path: string }, dispatch) => { dispatch(renameFile(data.path)); } -- 2.30.2