오류 수정
This commit is contained in:
@@ -169,12 +169,27 @@ window.toggleSelectAll = (isChecked) => {
|
||||
};
|
||||
|
||||
/** 선택 리셋 */
|
||||
// [수정] 기존 resetSelection을 모달 오픈으로 변경
|
||||
window.resetSelection = () => {
|
||||
if (!confirm('선택된 내역을 모두 초기화할까요?')) return;
|
||||
const modal = document.getElementById('selection-reset-modal');
|
||||
modal.classList.remove('hidden');
|
||||
modal.classList.add('flex');
|
||||
};
|
||||
|
||||
// [추가] 모달 닫기
|
||||
window.closeSelectionResetModal = () => {
|
||||
const modal = document.getElementById('selection-reset-modal');
|
||||
modal.classList.add('hidden');
|
||||
modal.classList.remove('flex');
|
||||
};
|
||||
|
||||
// [추가] 실제 초기화 실행 (기존 로직 그대로)
|
||||
window.confirmSelectionReset = () => {
|
||||
state.selectedIds.clear();
|
||||
saveSelection(); // 스토리지 동기화
|
||||
updateSummary();
|
||||
renderProducts(state.currentPage);
|
||||
window.closeSelectionResetModal();
|
||||
};
|
||||
|
||||
/** 선택 토글 시 스토리지 저장 추가 */
|
||||
|
||||
Reference in New Issue
Block a user