Skip to content

Ref warning and free space at the list end #2

Description

@kostyukdg

Hello.

Thanks for help in advance!

I have 2 issues that's I can't find how to fix:

  1. Free space when the loader doesn't have next page. I tried to use List height parameter but it doesn't help http://prntscr.com/tgvznk
  2. I can't solve warning "index.esm.js:217 Invalid list ref; please refer to InfiniteLoader documentation.". I can solve it without this scroller but I have no idea how to fix with. Getting Invalid warnings when creating own ref bvaughn/react-window#324 (comment)

code

 <InfiniteLoader
		isItemLoaded={isItemLoaded}
		itemCount={itemCount}
		loadMoreItems={loadMoreItems}
	>
		{({ onItemsRendered, loaderRef }) => (
			<ReactWindowScroller>
				{({ ref, outerRef, style, onScroll }) => {
					resetIndex = ref;
					return (
						<FeedListContext.Provider value={{ setSize, windowWidth, setDescriptionVisibility }}>
							<List
								className="List"
								style={style}
								height={window.innerHeight}
								itemCount={itemCount}
								itemSize={getSize}
								onItemsRendered={onItemsRendered}
								ref={ref}
								outerRef={outerRef}
								width="100%"
								onScroll={onScroll}
								overscanCount={6}
							>
								{Item}
							</List>
						</FeedListContext.Provider>
					);
				}}
			</ReactWindowScroller>
		)}
	</InfiniteLoader>

Thanks for the package!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions