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:
Liordino Neto 2020-07-03 18:06:11 -03:00 committed by Josh Harvey
parent f641e605a4
commit 994f823632
3 changed files with 16 additions and 6 deletions

View file

@ -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}
/>
)