@visactor/vtable 1.17.3-alpha.7 → 1.17.3-alpha.9

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.
package/cjs/PivotTable.js CHANGED
@@ -156,7 +156,7 @@ class PivotTable extends BaseTable_1.BaseTable {
156
156
  let columnDimensionTree, rowDimensionTree;
157
157
  options.columnTree && (columnDimensionTree = new tree_helper_1.DimensionTree(null !== (_p = this.internalProps.columnTree) && void 0 !== _p ? _p : [], this.layoutNodeId, this.options.columnHierarchyType, "grid" !== this.options.columnHierarchyType ? null !== (_q = this.options.columnExpandLevel) && void 0 !== _q ? _q : 1 : void 0)),
158
158
  options.rowTree && (rowDimensionTree = new tree_helper_1.DimensionTree(null !== (_r = this.internalProps.rowTree) && void 0 !== _r ? _r : [], this.layoutNodeId, this.options.rowHierarchyType, "grid" !== this.options.rowHierarchyType ? null !== (_s = this.options.rowExpandLevel) && void 0 !== _s ? _s : 1 : void 0)),
159
- internalProps.layoutMap = new pivot_header_layout_1.PivotHeaderLayoutMap(this, null, columnDimensionTree, rowDimensionTree),
159
+ internalProps.layoutMap.clearHeaderPathCache(), internalProps.layoutMap = new pivot_header_layout_1.PivotHeaderLayoutMap(this, null, columnDimensionTree, rowDimensionTree),
160
160
  !1 === this.internalProps.recordsIsTwoDimensionalArray && (this.flatDataToObjects = new flatDataToObject_1.FlatDataToObjects({
161
161
  rows: internalProps.layoutMap.fullRowDimensionKeys,
162
162
  columns: internalProps.layoutMap.colDimensionKeys,
@@ -201,7 +201,7 @@ class PivotTable extends BaseTable_1.BaseTable {
201
201
  }));
202
202
  }
203
203
  updatePagination(pagination) {
204
- pagination ? (this.pagination || (this.pagination = {
204
+ this.internalProps.layoutMap.clearHeaderPathCache(), pagination ? (this.pagination || (this.pagination = {
205
205
  currentPage: 0,
206
206
  perPageCount: 0
207
207
  }), "number" == typeof pagination.currentPage && pagination.currentPage >= 0 && (this.pagination.currentPage = pagination.currentPage),
@@ -645,6 +645,7 @@ class PivotTable extends BaseTable_1.BaseTable {
645
645
  return null;
646
646
  }
647
647
  toggleHierarchyState(col, row, recalculateColWidths = !0) {
648
+ this.internalProps.layoutMap.clearHeaderPathCache();
648
649
  const hierarchyState = this.getHierarchyState(col, row);
649
650
  if (hierarchyState === ts_types_1.HierarchyState.expand) this._refreshHierarchyState(col, row, recalculateColWidths),
650
651
  this.fireListeners(PIVOT_TABLE_EVENT_TYPE_1.PIVOT_TABLE_EVENT_TYPE.TREE_HIERARCHY_STATE_CHANGE, {
@@ -968,7 +969,8 @@ class PivotTable extends BaseTable_1.BaseTable {
968
969
  this.scenegraph.setLoadingHierarchyState(col, row);
969
970
  }
970
971
  release() {
971
- this.editorManager.release(), super.release();
972
+ this.internalProps.layoutMap.clearHeaderPathCache(), this.editorManager.release(),
973
+ super.release();
972
974
  }
973
975
  }
974
976