Skip to content

Commit

Permalink
chore: 增加废弃标记
Browse files Browse the repository at this point in the history
  • Loading branch information
JuZe committed Oct 11, 2023
1 parent b949e14 commit 08e2cb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/s2-core/src/facet/layout/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,9 @@ export class Node {

public isTotalRoot?: boolean;

/**
* @deprecated 已废弃, 该属性只记录相邻一级的隐藏信息,将会在未来版本中移除
*/
public hiddenChildNodeInfo?: HiddenColumnsInfo | null;

public extra?: Record<string, any>;
Expand Down
2 changes: 1 addition & 1 deletion packages/s2-core/src/utils/layout/generate-header-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const generateHeaderNodes = (params: HeaderNodesParams) => {
// 如果当前是隐藏节点, 给其父节点挂载相应信息 (兄弟节点, 当前哪个子节点隐藏了), 这样在 facet 层可以直接使用, 不用每次都去遍历
const hiddenColumnsInfo = spreadsheet?.facet?.getHiddenColumnsInfo(node);
if (hiddenColumnsInfo && parentNode) {
// hiddenChildNodeInfo 属性在 S2 中没有用到,但是没删怕外部有使用
// hiddenChildNodeInfo 属性在 S2 中没有用到,但是没删怕外部有使用,已标记为废弃
parentNode.hiddenChildNodeInfo = hiddenColumnsInfo;
}

Expand Down

0 comments on commit 08e2cb7

Please sign in to comment.