v4.0.23
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
sxstyles inuseMemokeyed on theme/colorScheme and the
variant flags that actually drive the rules (withBorder, withColumnBorders,
cellPadding, striped, highlightOnHover, fontSize). - Wrap the inline
getRowIdwrapper inuseCallbackkeyed on the caller's
getRowIdso 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.23Documentation
Visit https://react.archbase.dev for full documentation.