fix: autocomplete input not showing available options
fix: remove log
This commit is contained in:
parent
17e1da61f3
commit
175a98d50f
4 changed files with 28 additions and 6 deletions
|
|
@ -49,8 +49,10 @@ const Autocomplete = ({
|
|||
return multiple ? value : [value]
|
||||
}
|
||||
|
||||
const filter = (array, input) =>
|
||||
sort(array, input, { keys: [valueProp, labelProp] })
|
||||
const filter = (array, input) => {
|
||||
if (!input) return array
|
||||
return sort(array, input, { keys: [valueProp, labelProp] })
|
||||
}
|
||||
|
||||
const filterOptions = (array, { inputValue }) =>
|
||||
R.union(
|
||||
|
|
|
|||
|
|
@ -54,12 +54,22 @@ const Wizard = ({ machine, locale, onClose, save, error }) => {
|
|||
{
|
||||
type: 'top',
|
||||
display: 'Cassette 1 (Top)',
|
||||
component: Autocomplete
|
||||
component: Autocomplete,
|
||||
inputProps: {
|
||||
options: R.map(it => ({ code: it, display: it }))(options),
|
||||
labelProp: 'display',
|
||||
valueProp: 'code'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'bottom',
|
||||
display: 'Cassette 2',
|
||||
component: Autocomplete
|
||||
component: Autocomplete,
|
||||
inputProps: {
|
||||
options: R.map(it => ({ code: it, display: it }))(options),
|
||||
labelProp: 'display',
|
||||
valueProp: 'code'
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'zeroConfLimit',
|
||||
|
|
|
|||
|
|
@ -25,7 +25,12 @@ export default {
|
|||
display: 'Environment',
|
||||
component: Autocomplete,
|
||||
inputProps: {
|
||||
options: ['prod', 'test']
|
||||
options: [
|
||||
{ code: 'prod', display: 'prod' },
|
||||
{ code: 'test', display: 'test' }
|
||||
],
|
||||
labelProp: 'display',
|
||||
valueProp: 'code'
|
||||
},
|
||||
face: true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -23,7 +23,12 @@ const singleBitgo = code => ({
|
|||
display: 'Environment',
|
||||
component: Autocomplete,
|
||||
inputProps: {
|
||||
options: ['prod', 'test']
|
||||
options: [
|
||||
{ code: 'prod', display: 'prod' },
|
||||
{ code: 'test', display: 'test' }
|
||||
],
|
||||
labelProp: 'display',
|
||||
valueProp: 'code'
|
||||
},
|
||||
face: true
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue