From 6566802630f7d3ac26dc780d59ea20f77cb3207b Mon Sep 17 00:00:00 2001 From: Thorben <38816229+tklein1801@users.noreply.github.com> Date: Fri, 17 May 2024 02:09:04 +0200 Subject: [PATCH] fix: Update `isOptionEqualToValue` in order to fix wrong `selected`-value --- src/components/Base/Input/ReceiverAutocomplete.component.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Base/Input/ReceiverAutocomplete.component.tsx b/src/components/Base/Input/ReceiverAutocomplete.component.tsx index 8cff62c2..a5a5d0e1 100644 --- a/src/components/Base/Input/ReceiverAutocomplete.component.tsx +++ b/src/components/Base/Input/ReceiverAutocomplete.component.tsx @@ -66,8 +66,7 @@ export const ReceiverAutocomplete: React.FC = ({ value={value} onChange={onChange} filterOptions={applyReceiverOptionsFilter} - // FIXME: - isOptionEqualToValue={(option, value) => option.value === value?.value || typeof value.value === 'string'} + isOptionEqualToValue={(option, value) => option.value == value.value && option.label == value.label} defaultValue={defaultValue} loadingText="Loading..." loading={loading}