From 57d9290ce40ba078e6e40da3a963ae98928d77b2 Mon Sep 17 00:00:00 2001 From: Phanindra Sai Date: Sun, 10 Nov 2024 20:04:45 +0530 Subject: [PATCH] fix: Prevent Selection of both Target and Source when a transfer is made --- 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); };