Closed ssi02014 closed 3 days ago
Latest commit: cdb9ad79abe71325ef8e7288c377e1ceeac8bde6
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.88%. Comparing base (
d668f7f
) to head (aee5e52
). Report is 4 commits behind head on main.
@Sangminnn 의견주신 부분 수정 반영하였습니다 🤗
Overview
issue: https://github.com/modern-agile-team/modern-kit/issues/286
‼️ BREAKING CHANGE ‼️
마운트 시에 window 한정으로 scrollTo를 호출하던 기존
useWindowScrollTo
를 제거하고, 조금 더 범용적으로 사용 할 수 있는useScrollTo
신규 훅을 작성합니다.useScrollTo 훅이 반환하는
ref
를 특정 엘리먼트에 할당 후 함께 반환하는scrollTo
를 통해 해당 엘리먼트를 대상으로scrollTo
를 호출하는 커스텀 훅입니다.ref
를 할당하지 않으면 기본적으로window
를 대상으로 동작합니다.autoScrollOptions
인자를 할당하면 컴포넌트가 마운트 시 자동으로 타겟 엘리먼트를 대상으로scrollTo
가 호출됩니다.PR Checklist