From 735d65c7c5ae82dfbd9d66e76e28201f534a94f9 Mon Sep 17 00:00:00 2001 From: Ian Smith Date: Thu, 14 Nov 2019 11:20:45 -0800 Subject: [PATCH 1/2] change autoComplete attribute from "disabled" to "off" --- packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js index dda61b78c627c1..b5db3dbffc0997 100644 --- a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js +++ b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js @@ -733,7 +733,7 @@ export default function useAutocomplete(props) { 'aria-controls': popupOpen ? `${id}-popup` : null, // Disable browser's suggestion that might overlap with the popup. // (autocomplete and autofill) - autoComplete: 'disabled', + autoComplete: 'off', ref: inputRef, autoCapitalize: 'none', spellCheck: 'false', From c991e8f0cefbbd4f850ba75e0be698a2125d451b Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 16 Nov 2019 00:51:54 +0100 Subject: [PATCH 2/2] remove custom autoComplete value --- .../pages/components/autocomplete/DisabledOptions.js | 11 +---------- .../pages/components/autocomplete/DisabledOptions.tsx | 11 +---------- .../src/useAutocomplete/useAutocomplete.js | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/src/pages/components/autocomplete/DisabledOptions.js b/docs/src/pages/components/autocomplete/DisabledOptions.js index 82dba85b2c0c5d..268e2e28969452 100644 --- a/docs/src/pages/components/autocomplete/DisabledOptions.js +++ b/docs/src/pages/components/autocomplete/DisabledOptions.js @@ -11,16 +11,7 @@ export default function DisabledOptions() { getOptionDisabled={option => option === timeSlots[0] || option === timeSlots[2]} style={{ width: 300 }} renderInput={params => ( - + )} /> ); diff --git a/docs/src/pages/components/autocomplete/DisabledOptions.tsx b/docs/src/pages/components/autocomplete/DisabledOptions.tsx index ad90d5c6501a4a..34256ea6dbfe21 100644 --- a/docs/src/pages/components/autocomplete/DisabledOptions.tsx +++ b/docs/src/pages/components/autocomplete/DisabledOptions.tsx @@ -11,16 +11,7 @@ export default function DisabledOptions() { getOptionDisabled={(option: TimeSlot) => option === timeSlots[0] || option === timeSlots[2]} style={{ width: 300 }} renderInput={params => ( - + )} /> ); diff --git a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js index b5db3dbffc0997..a7e37d17c6901e 100644 --- a/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js +++ b/packages/material-ui-lab/src/useAutocomplete/useAutocomplete.js @@ -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',