feat(platform): 검색 인풋에 디바운스 적용#96
Merged
Merged
Conversation
업무함/근로자/서류 목록 검색이 키 입력마다 즉시 필터링해, 실 API 연동 시 매 키 입력마다 요청이 나가게 될 위험이 있었다. 공통 useDebouncedValue 훅(기본 200ms)을 추가해 세 페이지의 검색 필터링에 적용했다. 인풋 자체는 즉시 반응하고, 필터링에 쓰이는 값만 디바운스된다. Closes #91
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요
업무함/근로자/서류 목록의 검색 인풋이 키 입력마다 즉시 필터링한다. 지금은 클라이언트 필터링뿐이라 문제없지만, 실 API 연동 시 매 키 입력마다 요청이 나가게 된다.
변경 사항
useDebouncedValue.ts/.test.ts신규: 제네릭 디바운스 훅(기본 200ms)WorkListPage,WorkerListPage,DocumentListPage: 검색 인풋은 즉시 반응하되(controlled value 그대로), 필터링에 쓰는 값만 디바운스된 값으로 교체waitFor로 대기한 뒤 포함 항목을 검증하도록 수정 (디바운스 이전 상태와 혼동되지 않도록)완료 조건
useDebouncedValue훅 추가검증
npm run lintnpm run test(전체 124개 통과)npm run buildCloses #91