Skip to content

Commit

Permalink
remove custom autoComplete value
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 15, 2019
1 parent 735d65c commit c991e8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
11 changes: 1 addition & 10 deletions docs/src/pages/components/autocomplete/DisabledOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@ export default function DisabledOptions() {
getOptionDisabled={option => option === timeSlots[0] || option === timeSlots[2]}
style={{ width: 300 }}
renderInput={params => (
<TextField
{...params}
label="Disabled options"
variant="outlined"
fullWidth
inputProps={{
...params.inputProps,
autoComplete: 'disabled', // disable autocomplete and autofill
}}
/>
<TextField {...params} label="Disabled options" variant="outlined" fullWidth />
)}
/>
);
Expand Down
11 changes: 1 addition & 10 deletions docs/src/pages/components/autocomplete/DisabledOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@ export default function DisabledOptions() {
getOptionDisabled={(option: TimeSlot) => option === timeSlots[0] || option === timeSlots[2]}
style={{ width: 300 }}
renderInput={params => (
<TextField
{...params}
label="Disabled options"
variant="outlined"
fullWidth
inputProps={{
...params.inputProps,
autoComplete: 'disabled', // disable autocomplete and autofill
}}
/>
<TextField {...params} label="Disabled options" variant="outlined" fullWidth />
)}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ export default function useAutocomplete(props) {
'aria-autocomplete': autoComplete ? 'both' : 'list',
'aria-controls': popupOpen ? `${id}-popup` : null,
// Disable browser's suggestion that might overlap with the popup.
// (autocomplete and autofill)
// Handle autocomplete but not autofill.
autoComplete: 'off',
ref: inputRef,
autoCapitalize: 'none',
Expand Down

0 comments on commit c991e8f

Please sign in to comment.