for (let i = 1; i < orderedCheckedPopups.length; i++) {
const checked = orderedCheckedPopups[i];
const originalIndex = displayList.findIndex((item) => item.id === checked.id);
if (originalIndex >= 0 && originalIndex <= afterDraggingIndex) {
hiddenCount += 1;
}
이렇게 된 for문
첫 번째 요소만 제거해서 하는게 필요했다.
const checked = orderedCheckedGoods.reduce((prev: any, item: any) => item);
prev 첫 번째 요소 제거하고 바로