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

estimatedItemSize - details #9

Closed
inzanez opened this issue Oct 13, 2021 · 4 comments
Closed

estimatedItemSize - details #9

inzanez opened this issue Oct 13, 2021 · 4 comments

Comments

@inzanez
Copy link

inzanez commented Oct 13, 2021

Hi

first of all, many thanks for that great component! :-) Works really nice and smooth.

I do have a question about the 'estimateItemSize' though:
I was under the impression that this was used to calculate the total scroll-height. So,...that it should basically match itemCount * itemSize in case of equal height items.

If that's right, I also thought that this would prevent that growing scrollbar during scrolling. It seems that as items are being recomputed, my scrollbar grows. So I tried to use estimatedItemSize as described above. But that gives me another weird behavior (scrolling to the bottom after a few initial correctly scrolled items). So maybe I got that totally wrong,...:-)

@jonasgeiler
Copy link
Owner

In all honesty, I'm not actually sure what this property does.
I've looked at both, my source code and the originaly react-tiny-virtual-list source code, and it's only used for calculation in getTotalSize . Although as soon as totalSize is set, this property is used instead and estimatedItemSize doesn't affect anything...
My guess is, it helps with initial rendering and reducing content shift, but other than that, I'm very sorry... Can't really help you.
You could try to open an issue here, but it doesn't seem to be actively maintained...

@inzanez
Copy link
Author

inzanez commented Oct 18, 2021

Not to worry, I think I'll try to dig into this...:-)

@jonasgeiler
Copy link
Owner

jonasgeiler commented May 17, 2022

Any updates on this? I'd like to close this issue.
Let me know if you need any help!

@inzanez
Copy link
Author

inzanez commented Sep 23, 2023

Of course,...I haven't found what exactly it does, so....I am ignoring it for now ;-)

@inzanez inzanez closed this as completed Sep 23, 2023
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

2 participants