Releases: niikeec/virtual-grid
Releases · niikeec/virtual-grid
@virtual-grid/[email protected]
Patch Changes
- cd26778: fix rerender issue
@virtual-grid/[email protected]
Patch Changes
- 3473540: Make totalCount public
@virtual-grid/[email protected]
Patch Changes
- 3473540: Make totalCount public
- Updated dependencies [3473540]
- @virtual-grid/[email protected]
- @virtual-grid/[email protected]
@virtual-grid/[email protected]
Patch Changes
- 3473540: Make totalCount public
@virtual-grid/[email protected]
Patch Changes
- 62cfcf9: Fix passing width and height props as undefined, which would previously override internal sizes.
@virtual-grid/[email protected]
@virtual-grid/[email protected]
Breaking changes
grid.virtualizer
has been replaced bygrid.rowVirtualizer
andgrid.columnVirtualizer
onLoadMore
andloadMoreSize
are not exported byuseGrid
anymorerowVirtualizer
andcolumnVirtualizer
can't be passed touseGrid
anymore- Properties of
grid.padding
andgrid.gap
are now partial
Simplified headless integration
useGrid
now exports two new functions getVirtualItem
and getLoadMoreTrigger
which immensely reduce boilerplate code when integrating a headless solution.
Example using getVirtualItem
:
{rowVirtualizer.getVirtualItems().map((row) => {
const item = grid.getVirtualItem({ row });
if (!item) return null;
return (
<div key={row.key} style={item.style}>
...
</div>
);
})}
Example using getLoadMoreTrigger
in combination with the new <LoadMoreTrigger />
component.
See Example
<LoadMoreTrigger {...grid.getLoadMoreTrigger()} />
Scroll margin has also been simplified with the new useScrollMargin
hook.
See Example
const { scrollMargin } = useScrollMargin({ scrollRef, gridRef });
// ...
const item = grid.getVirtualItem({ row, scrollMargin });
Other changes
rows
andcolumns
are now independent ofhorizontal
- Rows are now also resizable based on the height of the grid and number of rows using
horizontal
. Previously this was only possible with columns. - Improved performance by only measuring on demand
- Bump @tanstack/react-virtual to 3.0.1
What's up next?
- Improve docs
- Add more examples
- SolidJS integration. We got an active PR here.
@virtual-grid/[email protected]
@virtual-grid/[email protected]
Minor Changes
- Grid horizontal support
Patch Changes
- Updated dependencies
- @virtual-grid/[email protected]
@virtual-grid/[email protected]
Minor Changes
- Grid horizontal support