From 6e28975fcd764baaeefc1c3a0767f870c9a82020 Mon Sep 17 00:00:00 2001 From: tienifr Date: Wed, 5 Jun 2024 16:48:35 +0700 Subject: [PATCH] fix selected option is not highlighted --- src/components/SelectionList/BaseSelectionList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SelectionList/BaseSelectionList.tsx b/src/components/SelectionList/BaseSelectionList.tsx index f3f7f56be44f..8edb51967cd5 100644 --- a/src/components/SelectionList/BaseSelectionList.tsx +++ b/src/components/SelectionList/BaseSelectionList.tsx @@ -157,7 +157,7 @@ function BaseSelectionList( itemLayouts.push({length: fullItemHeight, offset}); offset += fullItemHeight; - if (item.isSelected) { + if (item.isSelected && !selectedOptions.find((option) => option.text === item.text)) { selectedOptions.push(item); } });