fix(client):format url values on form submit

This commit is contained in:
Valeriy
2019-06-17 23:40:47 +03:00
committed by mrugesh
parent c99366fa71
commit fbb8311af7
3 changed files with 38 additions and 38 deletions

View File

@@ -2,7 +2,12 @@ import React from 'react';
import PropTypes from 'prop-types';
import { reduxForm } from 'redux-form';
import { FormFields, BlockSaveButton, BlockSaveWrapper } from './';
import {
FormFields,
BlockSaveButton,
BlockSaveWrapper,
formatUrlValues
} from './';
const propTypes = {
buttonText: PropTypes.string,
@@ -48,7 +53,9 @@ export function DynamicForm({
return (
<form
id={`dynamic-${id}`}
onSubmit={handleSubmit(submit)}
onSubmit={handleSubmit((values, ...args) =>
submit(formatUrlValues(values, options), ...args)
)}
style={{ width: '100%' }}
>
<FormFields