       continue;
          }

          li.className = 'has-children';
          nodes = nodes.concat(this.getChildren(child, li));
        }
        return nodes;
      }

      findElement(event) {
        // If the target is a <span>, you clicked on the span inside the button
        // so you need to use currentTarget.
        let item = event.target;
        if (item.tagName === 'SPAN') {
          item = item.parentElement;
        }
        this.selectTreeElement(item);

        // Find the actual el