Row Full Width
Create full width rows in LyteNyte Grid that render a single cell spanning the entire viewport.
Full Width Row Predicate
Use rowFullWidthPredicate property on the grid to determine whether a row renders as a full width row.
A full width row spans the entire viewport and replaces the standard row that would otherwise render
in the same position.
Full width rows always span the viewport and remain visible during horizontal scrolling. Use them for section headers, summary rows, or other specialized content within the grid.
In the demo below, full width rows group data by the exchange on which each crypto symbol trades. This pattern is a common use case for full width rows.
The demo uses rowFullWidthRenderer to provide a React component for rendering full width rows. This
renderer can return any React component. In the demo, the component renders the exchange name and logo
centered within the row, as shown below.
function FullWidthCell({ api, row }: Grid.T.RowFullWidthRendererParams<GridSpec>) { if (!api.rowIsLeaf(row) || !row.data) return null;
const name = row.data.exchange; const image = exchanges[name];
return ( <div className="bg-ln-gray-05 flex h-full w-full items-center justify-center gap-1.5 text-xs"> <div> <img src={image} alt={`Logo for exchange ${name}`} className="size-5 overflow-hidden rounded-full" /> </div> <div className="overflow-hidden text-ellipsis">{name}</div> </div> );}Next Steps
- Row Pinning: Freeze rows at the top or bottom of the viewport.
- Row Spanning: Span cells across multiple rows.
- Row Dragging: Drag and drop rows within or between LyteNyte grids, or into external drop zones and apps.
