From 66acd1df346ef996e6123e18d0eebf795ad2a9e7 Mon Sep 17 00:00:00 2001 From: Phanindra Sai <56312093+jayaphanindra686@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:16:10 +0530 Subject: [PATCH] fix: Prevent Selection of both Target and Source when a transfer is made (#7404) Co-authored-by: Phanindra Sai --- components/lib/picklist/PickList.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/lib/picklist/PickList.js b/components/lib/picklist/PickList.js index 51e0b13c1c..ef5408dcdb 100644 --- a/components/lib/picklist/PickList.js +++ b/components/lib/picklist/PickList.js @@ -114,6 +114,7 @@ export const PickList = React.memo( }); } + onSelectionChange({ originalEvent, value: selectedValue }, 'targetSelection', props.onTargetSelectionChange); break; case 'allToTarget': @@ -127,6 +128,7 @@ export const PickList = React.memo( } selectedValue = []; + onSelectionChange({ originalEvent, value: selectedValue }, 'targetSelection', props.onTargetSelectionChange); break; @@ -140,6 +142,7 @@ export const PickList = React.memo( }); } + onSelectionChange({ originalEvent, value: selectedValue }, 'sourceSelection', props.onSourceSelectionChange); break; case 'allToSource': @@ -154,14 +157,13 @@ export const PickList = React.memo( selectedValue = []; + onSelectionChange({ originalEvent, value: selectedValue }, 'sourceSelection', props.onSourceSelectionChange); break; default: break; } - onSelectionChange({ originalEvent, value: selectedValue }, 'sourceSelection', props.onSourceSelectionChange); - onSelectionChange({ originalEvent, value: selectedValue }, 'targetSelection', props.onTargetSelectionChange); handleChange(event, source, target); };