From: Lucas Di Pentima Date: Thu, 12 Nov 2020 19:11:54 +0000 (-0300) Subject: 15685: Sets dialog forms to get immediate validation feedback. X-Git-Tag: 2.1.1~1^2~2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/b7b20fb214acc7e756360a081bb801afe16af775?hp=1b9616cd4d120cdc473e457637287502fff531b8 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 --- 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)); }