We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If itemHeight passed as a function, onViewableItemsChanged stops working onScroll; Example: const _itemHeight = useCallback( (_, i) => { const post = postStore.posts[i]; if (post?.media?.imageSizes?.compressed) { const {imgHeight} = getImageRatio( post.media.imageSizes.compressed.width, post.media.imageSizes.compressed.height, LIST_IMAGE.WIDTH, LIST_IMAGE.MAX_HEIGHT, ); return imgHeight + 220; } return ITEM_HEIGHT; }, [postStore.posts], );
const _itemHeight = useCallback( (_, i) => { const post = postStore.posts[i]; if (post?.media?.imageSizes?.compressed) { const {imgHeight} = getImageRatio( post.media.imageSizes.compressed.width, post.media.imageSizes.compressed.height, LIST_IMAGE.WIDTH, LIST_IMAGE.MAX_HEIGHT, ); return imgHeight + 220; } return ITEM_HEIGHT; }, [postStore.posts], );
The text was updated successfully, but these errors were encountered:
fix: get item offset with height as function
435fe48
Refs: #47
fix: get item offset with height as function on sections
048b5a6
No branches or pull requests
If itemHeight passed as a function, onViewableItemsChanged stops working onScroll;
Example:
const _itemHeight = useCallback( (_, i) => { const post = postStore.posts[i]; if (post?.media?.imageSizes?.compressed) { const {imgHeight} = getImageRatio( post.media.imageSizes.compressed.width, post.media.imageSizes.compressed.height, LIST_IMAGE.WIDTH, LIST_IMAGE.MAX_HEIGHT, ); return imgHeight + 220; } return ITEM_HEIGHT; }, [postStore.posts], );
The text was updated successfully, but these errors were encountered: