Skip to content

Commit

Permalink
Merge pull request #6474 from nitrogenous/6473-autocomplete-not-able-…
Browse files Browse the repository at this point in the history
…to-delete-a-manually-added-chip

Autocomplete Not able to delete a manually added chip
  • Loading branch information
nitrogenous authored Apr 29, 2024
2 parents c9eea79 + 5ce886d commit d40ad85
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions components/lib/autocomplete/AutoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ export const AutoComplete = React.memo(
};

const updateModel = (event, value) => {
// #2176 only call change if value actually changed
if (selectedItem.current && ObjectUtils.deepEquals(selectedItem.current, value)) {
return;
}

if (props.onChange) {
props.onChange({
originalEvent: event,
Expand Down Expand Up @@ -257,7 +252,7 @@ export const AutoComplete = React.memo(
const removeItem = (event, index) => {
const removedValue = props.value[index];
const newValue = props.value.filter((_, i) => index !== i);

updateModel(event, newValue);

if (props.onUnselect) {
Expand Down

0 comments on commit d40ad85

Please sign in to comment.