fix: autocomplete component rendering
This commit is contained in:
parent
0a42592cb0
commit
6bed841e79
2 changed files with 14 additions and 16 deletions
|
|
@ -81,20 +81,18 @@ const Autocomplete = ({
|
||||||
clearOnEscape
|
clearOnEscape
|
||||||
isOptionEqualToValue={R.eqProps(valueProp)}
|
isOptionEqualToValue={R.eqProps(valueProp)}
|
||||||
{...props}
|
{...props}
|
||||||
renderInput={params => {
|
renderInput={params => (
|
||||||
return (
|
<TextInput
|
||||||
<TextInput
|
{...params}
|
||||||
{...params}
|
autoFocus={autoFocus}
|
||||||
autoFocus={autoFocus}
|
label={label}
|
||||||
label={label}
|
value={outsideValue}
|
||||||
value={outsideValue}
|
error={error}
|
||||||
error={error}
|
size={size}
|
||||||
size={size}
|
fullWidth={fullWidth}
|
||||||
fullWidth={fullWidth}
|
textAlign={textAlign}
|
||||||
textAlign={textAlign}
|
/>
|
||||||
/>
|
)}
|
||||||
)
|
|
||||||
}}
|
|
||||||
renderOption={(iprops, props) => {
|
renderOption={(iprops, props) => {
|
||||||
if (!props.warning && !props.warningMessage)
|
if (!props.warning && !props.warningMessage)
|
||||||
return <li {...iprops}>{R.path([labelProp])(props)}</li>
|
return <li {...iprops}>{R.path([labelProp])(props)}</li>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ const TextInput = memo(
|
||||||
size,
|
size,
|
||||||
bold,
|
bold,
|
||||||
className,
|
className,
|
||||||
|
inputProps,
|
||||||
InputProps,
|
InputProps,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
|
|
@ -63,8 +64,7 @@ const TextInput = memo(
|
||||||
},
|
},
|
||||||
...InputProps,
|
...InputProps,
|
||||||
},
|
},
|
||||||
|
htmlInput: { style: { textAlign }, ...inputProps },
|
||||||
htmlInput: { style: { textAlign } },
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue