v4.0.25
feat(components): scroll-perf wins + truncate column prop for AG-Grid
Applies recommendations from AG-Grid's official scrolling-performance docs
and from the ag-grid-demos/performance React reference example.
ArchbaseDataGridAG perf:
- Wrap AgGridReact in React.memo (AgGridReactMemo). This is the single biggest
scroll-perf win: when the parent re-renders but every prop reference is the
same, AG-Grid skips its internal re-render entirely. - Stabilize getRowId via useCallback (was an inline arrow → invalidated memo).
- useStableChildren hook stabilizes the
childrenref used by the columnDefs
useMemo. JSX creates a new children array every parent render even when the
items are stable, which forced columnDefs to recompute and AG-Grid to
re-evaluate every column. Now recomputes only on real structural change. - rowBuffer={10} (explicit AG-Grid default).
- suppressRowHoverHighlight={!highlightOnHover} — disables hover class
recalculation when the consumer has already opted out of hover styling.
Truncate API:
- New
truncate?: booleanprop on ArchbaseDataGridAGColumnProps. When true,
archbase wraps the cellRenderer output in a span with ellipsis CSS, sets
cellStyle.overflow = 'hidden', adds a cellClass, and lazily injects a stylesheet
that forces the AG-Grid.ag-react-containerflex item to shrink (flex:1 1 0;
min-width:0; max-width:100%; overflow:hidden). Solves the long-text overflow
into adjacent columns problem in cells usingdisplay: flexlayout. Native
titleattribute exposes the full value as a browser tooltip.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Packages
- @archbase/core
- @archbase/data
- @archbase/components
- @archbase/layout
- @archbase/admin
- @archbase/advanced
- @archbase/security
- @archbase/security-ui
- @archbase/template
- @archbase/tools
- @archbase/feature-flags
- @archbase/ssr
Installation
npm install @archbase/core@4.0.25Documentation
Visit https://react.archbase.dev for full documentation.