fix: machine autocomplete and package-lock

This commit is contained in:
Taranto 2021-02-06 09:42:19 +00:00 committed by Josh Harvey
parent 538e32fbec
commit 3fd307ab17
12 changed files with 19397 additions and 6975 deletions

View file

@ -13,7 +13,7 @@ const Autocomplete = ({
valueProp,
multiple,
onChange,
getLabel,
labelProp,
value: outsideValue,
error,
fullWidth,
@ -50,7 +50,7 @@ const Autocomplete = ({
}
const filter = (array, input) =>
sort(array, input, { keys: ['code', 'display'] })
sort(array, input, { keys: [valueProp, labelProp] })
const filterOptions = (array, { inputValue }) =>
R.union(
@ -68,7 +68,7 @@ const Autocomplete = ({
multiple={multiple}
value={value}
onChange={innerOnChange}
getOptionLabel={getLabel}
getOptionLabel={R.path([labelProp])}
forcePopupIcon={false}
filterOptions={filterOptions}
openOnFocus