fix: added missing lodash dependency to accounts lib
fix: show full languages name on the dropdown fix: search crypto per name as well fix: limit selected languages to 4 (the same as the old admin) fix: removed duplicated import
This commit is contained in:
parent
f641e605a4
commit
994f823632
3 changed files with 16 additions and 6 deletions
|
|
@ -1,10 +1,12 @@
|
|||
import { useFormikContext } from 'formik'
|
||||
import * as R from 'ramda'
|
||||
import React from 'react'
|
||||
import React, { useState } from 'react'
|
||||
|
||||
import { Autocomplete } from '../base'
|
||||
|
||||
const AutocompleteFormik = ({ options, ...props }) => {
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
const { name, onBlur, value } = props.field
|
||||
const { touched, errors, setFieldValue } = props.form
|
||||
const error = !!(touched[name] && errors[name])
|
||||
|
|
@ -20,7 +22,10 @@ const AutocompleteFormik = ({ options, ...props }) => {
|
|||
onBlur={onBlur}
|
||||
value={value}
|
||||
error={error}
|
||||
open={open}
|
||||
options={innerOptions}
|
||||
onOpen={() => setOpen(value.length !== props.limit)}
|
||||
onClose={() => setOpen(false)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue