From 88be7f95abca46a6b295791d292a0e5aac4279b3 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Mon, 30 Nov 2020 17:39:12 +0100 Subject: [PATCH] fix sebastian's point about prevent default --- packages/material-ui/src/useAutocomplete/useAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/material-ui/src/useAutocomplete/useAutocomplete.js b/packages/material-ui/src/useAutocomplete/useAutocomplete.js index 875d14235258ca..1bc987e2cc5088 100644 --- a/packages/material-ui/src/useAutocomplete/useAutocomplete.js +++ b/packages/material-ui/src/useAutocomplete/useAutocomplete.js @@ -731,7 +731,7 @@ export default function useAutocomplete(props) { const option = filteredOptions[highlightedIndexRef.current]; const disabled = getOptionDisabled ? getOptionDisabled(option) : false; - // We don't want to validate the form. + // Avoid early form validation, let the end-users continue filling the form. event.preventDefault(); if (disabled) {