@visactor/vtable 1.26.1 → 1.26.2-none

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +11 -1
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotTable.js +9 -4
  5. package/cjs/PivotTable.js.map +1 -1
  6. package/cjs/core/BaseTable.js +5 -3
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/event/event.js +3 -1
  9. package/cjs/event/event.js.map +1 -1
  10. package/cjs/index.d.ts +1 -1
  11. package/cjs/index.js +1 -1
  12. package/cjs/index.js.map +1 -1
  13. package/cjs/layout/simple-header-layout.js +7 -7
  14. package/cjs/layout/simple-header-layout.js.map +1 -1
  15. package/cjs/plugins/list-tree-stick-cell.js +29 -3
  16. package/cjs/plugins/list-tree-stick-cell.js.map +1 -1
  17. package/cjs/state/select/update-position.js +2 -2
  18. package/cjs/state/select/update-position.js.map +1 -1
  19. package/cjs/vrender.js.map +1 -1
  20. package/dist/vtable.js +93 -14
  21. package/dist/vtable.min.js +1 -1
  22. package/es/ListTable.d.ts +1 -0
  23. package/es/ListTable.js +11 -1
  24. package/es/ListTable.js.map +1 -1
  25. package/es/PivotTable.js +9 -4
  26. package/es/PivotTable.js.map +1 -1
  27. package/es/core/BaseTable.js +5 -3
  28. package/es/core/BaseTable.js.map +1 -1
  29. package/es/event/event.js +3 -1
  30. package/es/event/event.js.map +1 -1
  31. package/es/index.d.ts +1 -1
  32. package/es/index.js +1 -1
  33. package/es/index.js.map +1 -1
  34. package/es/layout/simple-header-layout.js +7 -7
  35. package/es/layout/simple-header-layout.js.map +1 -1
  36. package/es/plugins/list-tree-stick-cell.js +32 -2
  37. package/es/plugins/list-tree-stick-cell.js.map +1 -1
  38. package/es/state/select/update-position.js +2 -2
  39. package/es/state/select/update-position.js.map +1 -1
  40. package/es/vrender.js.map +1 -1
  41. package/package.json +3 -3
package/es/PivotTable.js CHANGED
@@ -714,9 +714,12 @@ export class PivotTable extends BaseTable {
714
714
  }
715
715
  }
716
716
  _refreshHierarchyState(col, row, recalculateColWidths = !0, beforeUpdateCell) {
717
- var _a, _b;
717
+ var _a, _b, _c;
718
718
  this.frozenColCount, this.frozenRowCount;
719
- const visibleStartRow = this.getBodyVisibleRowRange().rowStart;
719
+ const sizeTolerance = (null === (_a = this.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0, oldMaxScrollTop = (() => {
720
+ var _a, _b;
721
+ return Math.max(0, this.getAllRowsHeight() - (null !== (_b = null === (_a = this.scenegraph) || void 0 === _a ? void 0 : _a.height) && void 0 !== _b ? _b : this.tableNoFrameHeight) - sizeTolerance);
722
+ })(), isScrollToBottom = oldMaxScrollTop > 0 && this.scrollTop >= oldMaxScrollTop - 1, visibleStartRow = this.getBodyVisibleRowRange().rowStart;
720
723
  this.internalProps._oldRowCount = this.rowCount, this.internalProps._oldColCount = this.colCount;
721
724
  let notFillWidth = !1, notFillHeight = !1;
722
725
  this.stateManager.updateHoverIcon(col, row, void 0, void 0);
@@ -727,9 +730,11 @@ export class PivotTable extends BaseTable {
727
730
  beforeUpdateCell && beforeUpdateCell(), this.refreshRowColCount();
728
731
  this.frozenColCount, this.frozenRowCount;
729
732
  this.clearCellStyleCache(), "tree" === this.rowHierarchyType && this.scenegraph.updateHierarchyIcon(col, row),
730
- null === (_a = this.reactCustomLayout) || void 0 === _a || _a.clearCache(), "grid-tree" !== this.rowHierarchyType && "grid-tree" !== this.columnHierarchyType ? this.scenegraph.updateRow(result.removeCellPositionsRowDirection, result.addCellPositionsRowDirection, result.updateCellPositionsRowDirection, recalculateColWidths) : (this.internalProps.stick.changedCells.clear(),
733
+ null === (_b = this.reactCustomLayout) || void 0 === _b || _b.clearCache(), "grid-tree" !== this.rowHierarchyType && "grid-tree" !== this.columnHierarchyType ? this.scenegraph.updateRow(result.removeCellPositionsRowDirection, result.addCellPositionsRowDirection, result.updateCellPositionsRowDirection, recalculateColWidths) : (this.internalProps.stick.changedCells.clear(),
731
734
  this.scenegraph.clearCells(), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(),
732
- this.scrollToRow(visibleStartRow)), null === (_b = this.reactCustomLayout) || void 0 === _b || _b.updateAllCustomCell(),
735
+ this.scrollToRow(visibleStartRow), isScrollToBottom && (this.clearCorrectTimer(),
736
+ this.setScrollTop(Number.MAX_SAFE_INTEGER))), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(),
737
+ isScrollToBottom && (this.clearCorrectTimer(), this.setScrollTop(Number.MAX_SAFE_INTEGER)),
733
738
  checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth),
734
739
  this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight),
735
740
  ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1)),