virtual-list icon indicating copy to clipboard operation
virtual-list copied to clipboard

ScrollTo not work in chrome extension

Open xyunsh opened this issue 1 year ago • 0 comments

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);
  }, []);

xyunsh avatar Aug 25 '24 08:08 xyunsh