Build a transfer list
Move selected or all options between two ordered lists without mutation or duplication.Description
Requirements
The solution exports the required TransferList API from the editable module.
List semantics works deterministically for the documented normal, boundary, and repeated-use scenarios.
Selected transfer works deterministically for the documented normal, boundary, and repeated-use scenarios.
Transfer all works deterministically for the documented normal, boundary, and repeated-use scenarios.
Stable order works deterministically for the documented normal, boundary, and repeated-use scenarios.
No duplicates works deterministically for the documented normal, boundary, and repeated-use scenarios.
Disabled actions works deterministically for the documented normal, boundary, and repeated-use scenarios.
The implementation derives new state without mutating caller-owned collections or records.
Move selected
Select Design and Research, then activate Move right
Both items move to Selected in their original order
Moving twice never duplicates an item and the source items array is unchanged.
Constraints
Treat item IDs as unique stable identitiesPreserve the original source ordering on both sidesDisable actions that cannot change state
Hints
Hint 1
Represent ownership and temporary checkbox selection as different pieces of state.
Hint 2
Derive each visible list from the source order and the set of selected IDs.
Hint 3
Clear temporary selections after a transfer so actions cannot accidentally repeat.