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

Can I replace the blank spaces which is caused by scrolling fast with other components? #743

Open
Derigion opened this issue Oct 18, 2023 · 2 comments

Comments

@Derigion
Copy link

Since items in a virtualized list only change when the user scrolls, blank space can briefly flash as newer entries are about to be displayed. I want to replace the blank spaces with some components to tell the users it's rendering.

@alejandrorascovan
Copy link

In your row component definition, you could first check if data[index] is undefined for example. I do something like this:

const Row = ({ data, index, style }) => {
	if (data[index] === undefined) return (<div style={style}><LoadingOrError /></div>);
...
@rishabhchand007
Copy link

In your row component definition, you could first check if data[index] is undefined for example. I do something like this:

const Row = ({ data, index, style }) => {
	if (data[index] === undefined) return (<div style={style}><LoadingOrError /></div>);
...

Didnt work for me.

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