Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support labelField in MindMap, IndentedTree, Fishbone, FlowGraph #2801

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

yvonneyx
Copy link
Collaborator

  • labelField 作为节点标签的映射通道,替换原先的直接使用 id
export interface MindMapOptions extends GraphOptions  {
  /**
   * Selects a field from the data to use as the label for the node.
   * If a string is provided, it will select the field as `data[labelField]`.
   * If a function is provided, it will call the function with the data and use the returned value.
   * @default (data) => data.id
   */
  labelField?: string | ((data: NodeData) => string);
  // ...
}

@hustcc
Copy link
Collaborator

hustcc commented Dec 11, 2024

跟福老师一起看看,单测还是要加起来~

@yvonneyx yvonneyx merged commit 26b7295 into v2 Dec 12, 2024
8 checks passed
@yvonneyx yvonneyx deleted the feat/field branch December 12, 2024 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants