Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#️⃣ 연관된 이슈
📝 훅 간단 사용 설명
useCheckList
체크리스트 상태를 관리하는 커스텀 React Hook입니다.
아이템 목록의 체크 상태를 효율적으로 관리하며, 개별 아이템 조작부터 전체 일괄 처리까지 다양한 기능을 제공합니다. To-do 리스트, 다중 선택 테이블, 설문조사 등에 활용할 수 있습니다.
🔗 사용법
매개변수
initialItems: T[]CheckableItem인터페이스를 확장해야 합니다id와checked속성이 없는 단순 배열도 자동으로 변환됩니다반환값
UseCheckListReturns<T>객체listT[]set(items: T[]) => voidisChecked(id: IdType<T>) => booleanisAllChecked() => booleancheckItem(id: IdType<T>) => voidunCheckItem(id: IdType<T>) => voidtoggleItem(id: IdType<T>) => voidupdateItem(id: IdType<T>, checked: boolean) => voidtoggleAll() => voidcheckAll() => voidunCheckAll() => voidupdateAll(checked: boolean) => voidgetCheckedList() => T[]getCheckedIds() => IdType<T>[]selectedCountnumber스크린샷 (선택)
2025-10-29.5.15.15.mov