Skip to content

Commit

Permalink
fix: Prevent Selection of both Target and Source when a transfer is m…
Browse files Browse the repository at this point in the history
…ade (#7404)

Co-authored-by: Phanindra Sai <[email protected]>
  • Loading branch information
jayaphanindra686 and Phanindra Sai authored Jan 6, 2025
1 parent 57719e5 commit 66acd1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/lib/picklist/PickList.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export const PickList = React.memo(
});
}

onSelectionChange({ originalEvent, value: selectedValue }, 'targetSelection', props.onTargetSelectionChange);
break;

case 'allToTarget':
Expand All @@ -127,6 +128,7 @@ export const PickList = React.memo(
}

selectedValue = [];
onSelectionChange({ originalEvent, value: selectedValue }, 'targetSelection', props.onTargetSelectionChange);

break;

Expand All @@ -140,6 +142,7 @@ export const PickList = React.memo(
});
}

onSelectionChange({ originalEvent, value: selectedValue }, 'sourceSelection', props.onSourceSelectionChange);
break;

case 'allToSource':
Expand All @@ -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);
};

Expand Down

0 comments on commit 66acd1d

Please sign in to comment.