Skip to content
New issue

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

虚拟滚动条能否配置不要delayHidden,客户反馈滚动条不太明显。最好能配置滚动条样式。 #78

Open
LeoHuiyi opened this issue Oct 30, 2020 · 4 comments

Comments

@LeoHuiyi
Copy link

如题

@LubomirIgonda1
Copy link

any update ?

@alex1blackhole
Copy link

alex1blackhole commented Apr 22, 2021

I used

  .rc-virtual-list-scrollbar {
      display : block !important;
  }

in my global css file

@prophetw
Copy link

发了一个 pull request 提供了 参数配置是否总是显示 滚动条
#158

@vladpuz
Copy link

vladpuz commented Dec 12, 2023

I'm using a workaround with MutationObserver:

useEffect(() => {
    const nodes = document.querySelectorAll<HTMLElement>(".rc-virtual-list-scrollbar");
    const scrollbars = Array.from(nodes);

    const observers = scrollbars.map((scrollbar) => {
      const observer = new MutationObserver(() => {
        scrollbar.style.visibility = "";
      });

      observer.observe(scrollbar, { attributes: true, attributeFilter: ["style"] });
      return observer;
    });

    return () => {
      observers.forEach((observer) => {
        observer.disconnect();
      });
    };
  }, []);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants