You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this commit https://github.com/vueuse/vueuse/commit/429edda72fc283a7540c79afbea1a0a6299221ae the threshold option got hardcoded to 0, when you have a list of elements on the screen this change causes to trigger isVisible flag true while the element is not fully on the screen. when it used to be 0.1 we didn't have the problem(0.1 is the default threshold of useIntersectionObserver). I think the best way to fix it is to the default threshold if it's not defined on the options like the below. you just need to update your typescript interface as well. const { window = defaultWindow, scrollTarget, threshold = 0 } = options
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
In this commit https://github.com/vueuse/vueuse/commit/429edda72fc283a7540c79afbea1a0a6299221ae the threshold option got hardcoded to 0, when you have a list of elements on the screen this change causes to trigger isVisible flag true while the element is not fully on the screen. when it used to be 0.1 we didn't have the problem(0.1 is the default threshold of useIntersectionObserver). I think the best way to fix it is to the default threshold if it's not defined on the options like the below. you just need to update your typescript interface as well.
const { window = defaultWindow, scrollTarget, threshold = 0 } = options
Reproduction
https://stackblitz.com/edit/vitejs-vite-rptfks/?file=package.json
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: