Skip to content

Node structure does not update when the data is updated via code #83

@tauseef-r-kazi

Description

@tauseef-r-kazi

I am using v-model="pointer" to track the currently selected node. however, if I add a child node using the below code it does not reflect under this.pointer.children array. How can the under lying graph object be updated from the parent component?

addCondition(data) {
          const newData = {
                name: "NewNode",
                id: this.indexCounter++,
                type: "newType",
                children: []
          }
          data.children.push(newData);
      }

component definition:
<tree ref="tree" class="tree-class" :data="graph" v-model="pointer" node-text="name" layoutType="horizontal" :identifier="getId" @clickedText="onNodeTextClick" :zoomable="true" :marginX="0" :marginY="0">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions