Merge pull request #829 from gnosis/development
Apps form validation hotfix
This commit is contained in:
commit
4b67153411
|
@ -7,7 +7,7 @@ import { Field } from 'react-final-form'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
validate: () => void,
|
validate: () => void,
|
||||||
debounce: number,
|
debounce?: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
const DebounceValidationField = ({ debounce = 1000, validate, ...rest }: Props) => {
|
const DebounceValidationField = ({ debounce = 1000, validate, ...rest }: Props) => {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { getAppInfoFromUrl } from './utils'
|
||||||
import Field from '~/components/forms/Field'
|
import Field from '~/components/forms/Field'
|
||||||
import DebounceValidationField from '~/components/forms/Field/DebounceValidationField'
|
import DebounceValidationField from '~/components/forms/Field/DebounceValidationField'
|
||||||
import GnoForm from '~/components/forms/GnoForm'
|
import GnoForm from '~/components/forms/GnoForm'
|
||||||
import { composeValidators, required } from '~/components/forms/validator'
|
import { required } from '~/components/forms/validator'
|
||||||
import Img from '~/components/layout/Img'
|
import Img from '~/components/layout/Img'
|
||||||
import appsIconSvg from '~/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg'
|
import appsIconSvg from '~/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg'
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ const composeValidatorsApps = (...validators: Function[]): FieldValidator => (va
|
||||||
if (!meta.modified) {
|
if (!meta.modified) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return composeValidators(validators)
|
return validators.reduce((error, validator) => error || validator(value), undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ManageApps = ({ appList, onAppAdded, onAppToggle }: Props) => {
|
const ManageApps = ({ appList, onAppAdded, onAppToggle }: Props) => {
|
||||||
|
|
Loading…
Reference in New Issue