submitting the form should also close modal

This commit is contained in:
Luis Rodriguez 2023-04-13 09:50:24 -05:00
parent a565d9ddc8
commit dfab9f631e

View File

@ -68,6 +68,8 @@ const reducer = (state = initialState, action) =>
break;
}
case 'SUBMIT_FIELD_FORM': {
draftState.fieldForm = {};
draftState.fieldToEdit = '';
const fieldMetadataPath = ['modifiedData', 'metadatas', state.fieldToEdit, 'list'];
set(draftState, [...fieldMetadataPath, 'label'], state.fieldForm.label);
set(draftState, [...fieldMetadataPath, 'sortable'], state.fieldForm.sortable);