Skip to content

1.2.0

Choose a tag to compare

@ja-plus ja-plus released this 22 Aug 06:05
· 21 commits to master since this release

1.2.0

  • Feature
    • feat: scrollTo gains an options overload scrollTo({ top, left, behavior }) — each axis accepts a pixel number or a { index, key, px } target (row by index/rowKey, column by index/dataIndex), supports behavior: 'smooth'; the legacy scrollTo(top, left) form is unchanged.
    • feat: add instance method clearMergeCellsCache to clear the mergeCells result cache and force recalculation.
    • feat: mergeCells supports huge rowspan in virtual mode — rows covered by an off-viewport rowspan anchor are compressed into placeholder rows to keep DOM size proportional to the viewport.
    • feat: mergeCells supports huge colspan in virtualX mode — the visible column range is expanded so merged cells anchored off-viewport stay fully rendered.
  • Optimize
    • perf: autoRowHeight virtual scrolling row location is now O(log n) via a Fenwick tree; scrollHeight is the precise sum of per-row heights instead of an estimation.
    • perf: useAreaSelection is tree-shakable (~6KB gzipped dropped when unused); package.json declares "sideEffects": false.
    • perf: reduced DOM node count in merged scenarios and eliminated the double rendering of merged rows.
    • perf: virtualScroll / virtualScrollX switched to shallowRef with explicit triggerRef, reducing deep Proxy overhead in the scroll hot path.
    • perf: fixed a regression from the shallowRef switch — triggerRef now fires only when a store value actually changed (instead of unconditionally), so a scroll that leaves the viewport unchanged no longer forces a full re-render; scroll recalculation is back to 0.02ms level (scrollX 1.7→0.01ms, setAutoHeight 2.6→0.3ms).
  • Bugfix:
    • fix: autoRowHeight + virtual + stripe — rows outside the viewport had their td stripped and collapsed; the td-stripping optimization now only applies to fixed row height.
    • fix: remove contain: paint from tbody tr — it clipped cells to a zero-height row box, causing cells to disappear.