fix: rework wallet screen
This commit is contained in:
parent
1f7ae74b42
commit
1f6d272aa0
103 changed files with 2094 additions and 3892 deletions
|
|
@ -1,11 +1,17 @@
|
|||
import { useFormikContext } from 'formik'
|
||||
import * as R from 'ramda'
|
||||
import React from 'react'
|
||||
|
||||
import { Autocomplete } from '../base'
|
||||
|
||||
const AutocompleteFormik = props => {
|
||||
const AutocompleteFormik = ({ options, ...props }) => {
|
||||
const { name, onBlur, value } = props.field
|
||||
const { touched, errors, setFieldValue } = props.form
|
||||
const error = !!(touched[name] && errors[name])
|
||||
const { initialValues } = useFormikContext()
|
||||
|
||||
const iOptions =
|
||||
R.type(options) === 'Function' ? options(initialValues) : options
|
||||
|
||||
return (
|
||||
<Autocomplete
|
||||
|
|
@ -14,6 +20,7 @@ const AutocompleteFormik = props => {
|
|||
onBlur={onBlur}
|
||||
value={value}
|
||||
error={error}
|
||||
options={iOptions}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue