Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

append item in treeview vuetify

addChild(item) {
  if (!item.children) {
    this.$set(item, "children", []);
  }

  const name = `${item.name} (${item.children.length})`;
  const id = this.nextId++;
  item.children.push({
    id,
    name
  });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #item #treeview #vuetify
ADD COMMENT
Topic
Name
6+5 =