Example #1
0
actions.open = (formName, id = null) => (dispatch) => {
  if (id) {
    dispatch({
      [API_REQUEST]: {
        url: ['apiv2_user_get', {id}],
        success: (response, dispatch) => {
          dispatch(formActions.resetForm(formName, response, false))
        }
      }
    })
  } else {
    dispatch(formActions.resetForm(formName, UserTypes.defaultProps, true))
  }
}
Example #2
0
 success: (response, dispatch) => {
   dispatch(formActions.resetForm(formName, response, false))
 }