react-component / react-component/virtual-list

[QUESTION]如何判断已经滚动到了底部

Open
#256 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
814
Forks
171
Avg merge
1h 3m
Merged PRs (30d)
3

Description

我通过ref.current.getScrollInfo拿到的信息很奇怪
我的高度设置的是200,内容高度是动态(获取到的是700),然后滚动到底部的时候scrollInfo.y显示的500,这个500的值应该是内容高度700-高度200.
但是我拿不到这个700的值,我就无法判断是否滚动到底部了

所以getScrollInfo能不能暴露更多的信息?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation and public API for ref.current.getScrollInfo, then read how the virtual list calculates its viewport and content heights. Confirm which scroll information is currently exposed and define the smallest API change that lets callers determine whether scrolling has reached the bottom. Done means the additional information is available and its behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.