Skip to content

Commit

Permalink
fix: use getNodeLikeDatum
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonneyx committed Aug 7, 2024
1 parent ee10369 commit 59e99c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/g6/__tests__/demos/case-decision-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const caseDecisionTree: TestCase = async (context) => {

class TreeNode extends Rect {
get data() {
return this.context.model.getNodeLikeData([this.id])[0] as Record<string, string>;
return this.context.model.getNodeLikeDatum(this.id) as Record<string, string>;
}

get childrenData() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const GREY_COLOR = '#CED4D9';

class TreeNode extends Rect {
get data() {
return this.context.model.getNodeLikeData([this.id])[0];
return this.context.model.getNodeLikeDatum(this.id);
}

get childrenData() {
Expand Down

0 comments on commit 59e99c1

Please sign in to comment.