Skip to content

Commit

Permalink
Show Autocomplete enablement visually
Browse files Browse the repository at this point in the history
Also enable and disable the rendered input of MuiAutocomplete to
visually indicate the Autocomplete enablement.
  • Loading branch information
sdirix committed Jul 16, 2020
1 parent b53bcbd commit 2755bff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/material/src/extended/MuiAutocomplete.tsx
Expand Up @@ -77,7 +77,14 @@ export const MuiAutocomplete = React.memo((props: EnumCellProps & WithClassname
getOptionLabel={getOptionLabel || (option => option?.label)}
style={{ marginTop: 16 }}
renderInput={params => (
<Input style={{ width: '100%' }} type='text' inputProps={params.inputProps} inputRef={params.InputProps.ref} autoFocus={appliedUiSchemaOptions.focus}/>
<Input
style={{ width: '100%' }}
type='text'
inputProps={params.inputProps}
inputRef={params.InputProps.ref}
autoFocus={appliedUiSchemaOptions.focus}
disabled={!enabled}
/>
)}
renderOption={renderOption}
filterOptions={filterOptions}
Expand Down

0 comments on commit 2755bff

Please sign in to comment.