Skip to content

v4.0.23

Choose a tag to compare

@github-actions github-actions released this 27 May 18:52
· 19 commits to main since this release

feat(components): memoize ArchbaseDataGrid styles and getRowId to fix scroll lag

The DataGrid passed a freshly-built sx object (~290 lines of selectors) and a
new arrow function for getRowId on every render. Each parent re-render caused
emotion to regenerate hundreds of CSS classes and MUI X to invalidate its row
index, making vertical scroll laggy as virtualized rows mounted into view.

  • Wrap the themed sx styles in useMemo keyed on theme/colorScheme and the
    variant flags that actually drive the rules (withBorder, withColumnBorders,
    cellPadding, striped, highlightOnHover, fontSize).
  • Wrap the inline getRowId wrapper in useCallback keyed on the caller's
    getRowId so MUI X sees a stable reference.

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.23

Documentation

Visit https://react.archbase.dev for full documentation.