Skip to content

Commit

Permalink
[Autocomplete] Validate freeSolo input (with multiple) (mui-org#18656)
Browse files Browse the repository at this point in the history
  • Loading branch information
picautmarine committed Dec 17, 2019
1 parent 6ced014 commit 5c0d094
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@ export default function useAutocomplete(props) {
const handleInputChange = event => {
const newValue = event.target.value;

if (onInputChange) {
onInputChange(event, newValue, 'input');
}

if (newValue === '') {
if (disableOpenOnFocus) {
handleClose(event);
Expand All @@ -656,10 +660,6 @@ export default function useAutocomplete(props) {
}

setInputValue(newValue);

if (onInputChange) {
onInputChange(event, newValue, 'input');
}
};

const handleOptionMouseOver = event => {
Expand Down

0 comments on commit 5c0d094

Please sign in to comment.