@visactor/vtable 1.26.2-alpha.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 +4 -4
package/cjs/PivotTable.js CHANGED
@@ -719,9 +719,12 @@ class PivotTable extends BaseTable_1.BaseTable {
719
719
  }
720
720
  }
721
721
  _refreshHierarchyState(col, row, recalculateColWidths = !0, beforeUpdateCell) {
722
- var _a, _b;
722
+ var _a, _b, _c;
723
723
  this.frozenColCount, this.frozenRowCount;
724
- const visibleStartRow = this.getBodyVisibleRowRange().rowStart;
724
+ const sizeTolerance = (null === (_a = this.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0, oldMaxScrollTop = (() => {
725
+ var _a, _b;
726
+ 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);
727
+ })(), isScrollToBottom = oldMaxScrollTop > 0 && this.scrollTop >= oldMaxScrollTop - 1, visibleStartRow = this.getBodyVisibleRowRange().rowStart;
725
728
  this.internalProps._oldRowCount = this.rowCount, this.internalProps._oldColCount = this.colCount;
726
729
  let notFillWidth = !1, notFillHeight = !1;
727
730
  this.stateManager.updateHoverIcon(col, row, void 0, void 0);
@@ -732,9 +735,11 @@ class PivotTable extends BaseTable_1.BaseTable {
732
735
  beforeUpdateCell && beforeUpdateCell(), this.refreshRowColCount();
733
736
  this.frozenColCount, this.frozenRowCount;
734
737
  this.clearCellStyleCache(), "tree" === this.rowHierarchyType && this.scenegraph.updateHierarchyIcon(col, row),
735
- 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(),
738
+ 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(),
736
739
  this.scenegraph.clearCells(), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(),
737
- this.scrollToRow(visibleStartRow)), null === (_b = this.reactCustomLayout) || void 0 === _b || _b.updateAllCustomCell(),
740
+ this.scrollToRow(visibleStartRow), isScrollToBottom && (this.clearCorrectTimer(),
741
+ this.setScrollTop(Number.MAX_SAFE_INTEGER))), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(),
742
+ isScrollToBottom && (this.clearCorrectTimer(), this.setScrollTop(Number.MAX_SAFE_INTEGER)),
738
743
  checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth),
739
744
  this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight),
740
745
  ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1)),