Closed mchitson closed 3 years ago
Hi thank you I managed to get it working. Thank you so much! It’s a hell of a lot easier than ReactVirtualized.
Just a quick question, since we need to set the firstItemIndex and I don’t know at the beginning how many records I will be loading, I can set it to an very large number for arguments sake 10,000. What happens if I end up with number of records > 10k? What is the significance of the firstItemIndex, having it extremely large doesn’t impact memory/performance or anything does it?
On Feb 26, 2021, at 12:26 PM, Petyo Ivanov notifications@github.com wrote:
You can use a very large number and decrement it; Not sure I understand what the problem is. Please provide a reproduction in codesandbox; - I will re-open the issue once I can look into it. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/petyosi/react-virtuoso/issues/306#issuecomment-786784324, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSSPFXX5KEJNMSXFMOW723TA7KV7ANCNFSM4YIXLHFA.
the first item index is used internally for calculations - and it has certain boundaries which I should be able to fix at some point (hence the necessity of it being above zero). Using a large number (1M) has no negative performance.
Great. One more question (sorry), it seems the endless scroll triggers endMore on first load as well so that I am loading twice the amount of data am expecting. Is there a way to ensure endMore loads only on scroll?
That’s my code:
displayUsers = (users) => { return ( <Virtuoso className='users-container' data={users} components={{Footer: () => (this.state.loadingMore && this.state.hasMore) ? <div style={{display: 'flex'}}><Spin style={{margin: 'auto'}}/>
Hi
Me again, when I scroll by mouse through my virtualized list, sometimes the whole list goes blank for a while before it renders it. It’s quite a noticeable lag. Is there anything that can be done?
On Feb 28, 2021, at 6:09 PM, Michele Chitson mchitson@gmail.com wrote:
Great. One more question (sorry), it seems the endless scroll triggers endMore on first load as well so that I am loading twice the amount of data am expecting. Is there a way to ensure endMore loads only on scroll?
That’s my code:
displayUsers = (users) => { return ( <Virtuoso className='users-container' data={users} components={{Footer: () => (this.state.loadingMore && this.state.hasMore) ? <div style={{display: 'flex'}}><Spin style={{margin: 'auto'}}/>
Hi does this work when the list changes /expands? couple of issues: