-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
@egjs/react-infinitegrid
version - ^4.12.0
This is my component
import { JustifiedInfiniteGrid} from '@egjs/react-infinitegrid';
<JustifiedInfiniteGrid
className="w-full h-screen"
gap={8}
container={true}
scrollContainer={parentRef}
columnRange={[1, 4]}
rowRange={0}
defaultDirection={'end'}
sizeRange={[200, 120]}
isCroppedSize={false}
displayedRow={-1}
stretch={true}
stretchRange={[144, 320]}
autoResize
useResizeObserver
onChangeScroll={e => {
const { scrollHeight, scrollTop, clientHeight } = e.currentTarget.getWrapperElement();
if (!isRefetching && scrollTop + clientHeight >= scrollHeight) {
setPageSize(prev => prev + 10);
}
}}>
{rowData.map((item, index) => (
<Item data-grid-groupkey={item._id} key={item._id} num={item.name} index={index} />
))}
</JustifiedInfiniteGrid>
Metadata
Metadata
Assignees
Labels
No labels