react-component / react-component/virtual-list

ScrollTo not work in chrome extension

Open
#286 0 comments 1 reaction 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

repo
code

When creating multiple accounts, need to scroll to the selected account when entering the page.

useEffect(() => {
    const timeoutId = setTimeout(() => {
      if (refList.current && currentIndex >= 0) {
        refList.current?.scrollTo({ index: currentIndex });
      }
    });

    return () => clearTimeout(timeoutId);
  }, []);

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 with src/ui/pages/Account/SwitchAccountScreen.tsx in the linked repository and reproduce entering the page with multiple accounts in Chrome. Trace the refList scrollTo call and compare the result with the selected account index. Done means the selected account is visible when the page opens.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.