Closed wangxing-sunny closed 4 years ago
const groupContainer = ({ children, style, ...restProps }) => { let newStyle = { ...style }; newStyle = { ...style, position: 'relative' }; return ( <div {...restProps} style={newStyle}> {children} ); };
export default () => { // set the initialTopMostItemIndex to 999 to have the list start at the bottom return (
) }` Is there a solution to this? Thanks!
@shawnwangzZ if you don't want the sticky headers, the best option would be to use the flat list and render headers at specific indexes. Hope this makes sense.
Thanks! I solved this with your suggestion.
I resolved this by adding visibility:'hidden' to the sticky element.
In my case, I don't want the title sticky on top. I've tried to set the GroupContainer, but initialTopMostItemIndex will have some problem. Here is the case. `import React from 'react' import { GroupedVirtuoso } from 'react-virtuoso'
const groupRender = index => { return <div style={{height: 20}}>group-{index}
const itemRender = index => { return <div style={{height: 80}}>item-{index}