Update parent of node

Issue #55 new
osama_sadow created an issue

How to change the tree view when I update a parent of an existing node, so the node must be moved from the old parent to the new one.

I use this part of the code

setState(() {
  Node? node = _treeViewController.selectedNode;
  if (result.parentId != null) {
    Node? parentNode = _treeViewController.getNode(result.parentId);
    _treeViewController = _treeViewController.withUpdateNode(
        parentNode!.key,
        node!.copyWith(label: '${result.number} - ${result.name}'));
  }
});

Comments (0)

  1. Log in to comment