From 53ec258463fe309c99639aaf05070b0293c3d965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toprak=20Ko=C3=A7?= Date: Thu, 25 Apr 2024 17:02:06 +0300 Subject: [PATCH 1/2] Removed If Condition --- components/lib/autocomplete/AutoComplete.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/components/lib/autocomplete/AutoComplete.js b/components/lib/autocomplete/AutoComplete.js index 6442e8fca3..5ef1b376f0 100644 --- a/components/lib/autocomplete/AutoComplete.js +++ b/components/lib/autocomplete/AutoComplete.js @@ -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, @@ -255,9 +250,11 @@ export const AutoComplete = React.memo( }; const removeItem = (event, index) => { + const removedValue = props.value[index]; const newValue = props.value.filter((_, i) => index !== i); - + + console.log(removedValue, newValue); updateModel(event, newValue); if (props.onUnselect) { From 5ce886d805396ba4f700df1386fc2b8f53a5169c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toprak=20Ko=C3=A7?= Date: Thu, 25 Apr 2024 17:24:12 +0300 Subject: [PATCH 2/2] removed testing materials --- components/lib/autocomplete/AutoComplete.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/lib/autocomplete/AutoComplete.js b/components/lib/autocomplete/AutoComplete.js index 5ef1b376f0..a56f600a1e 100644 --- a/components/lib/autocomplete/AutoComplete.js +++ b/components/lib/autocomplete/AutoComplete.js @@ -250,11 +250,9 @@ export const AutoComplete = React.memo( }; const removeItem = (event, index) => { - const removedValue = props.value[index]; const newValue = props.value.filter((_, i) => index !== i); - console.log(removedValue, newValue); updateModel(event, newValue); if (props.onUnselect) {