run attached code snippet and look at output.
1. Select one item, or several items using Ctrl. Output will be correct:
Selected: 0 item(s) []:
Selected: 1 item(s) [3]: Emma
Selected: 2 item(s) [3, 1]: Emma Isabella
2. Now select several items by clicking on first item and shift-click on 3rd item. Output will show that items are duplicated in the result list:
Selected: 6 item(s) [1, 1, 2, 2, 3, 3]: Isabella Isabella Ethan Ethan Emma Emma
1. Select one item, or several items using Ctrl. Output will be correct:
Selected: 0 item(s) []:
Selected: 1 item(s) [3]: Emma
Selected: 2 item(s) [3, 1]: Emma Isabella
2. Now select several items by clicking on first item and shift-click on 3rd item. Output will show that items are duplicated in the result list:
Selected: 6 item(s) [1, 1, 2, 2, 3, 3]: Isabella Isabella Ethan Ethan Emma Emma