react-infinite-scroller
react-infinite-scroller copied to clipboard
Is it possible to render it as a React Fragment with the element prop?
Is this possible right now? I've tried passing it in in different forms but can't get it to work. Rendering it as the default div element is breaking all of the styling
Also need this....
Use element prop like this element='div' (default div tag, you can change it to anything else, ul for example). And apply style prop to the component:
<InfiniteScroll
element='ul' // define element here
style={{
display: 'flex'
}} // define custom styles
pageStart={0}
loadMore={loadFunc}
hasMore={true || false}
loader={<div className="loader" key={0}>Loading ...</div>}
useWindow={false}
getScrollParent={() => this.scrollParentRef}
>
{items}
</InfiniteScroll>
Same here, it completely breaks my styles, I'm using mui and I just can't add my styles on top, please add option to create fragment