Pass config to the tree
<template>
<div>
- <Tree class="wptree" :data="treeData" :key="Math.random()">
+ <Tree class="wptree" :data="treeData" :config="treeConfig" :key="Math.random()">
<Placeholder>Your processing tree has no nodes.</Placeholder>
</Tree>
<!-- <DisplayAsJson :obj="treeData"/> -->
@@ -20,6 +20,7 @@ import { Patterns } from 'wp-design-system';
})
export default class ProcessingTree extends Vue {
@Prop() public tree!: MatcherConfigDto;
+ @Prop() public loaded!: boolean;
public count = 0;
@@ -28,6 +29,13 @@ export default class ProcessingTree extends Vue {
return {cards: [treeCard]};
}
+ get treeConfig(): Patterns.TreeConfig {
+ return {
+ class: 'wptree',
+ loaded: this.loaded,
+ };
+ }
+
private toTreeNode(name: string, node: MatcherConfigDto): Patterns.TreeCard {
if (node.type === 'Filter') {
const treeNode: Patterns.TreeCard = {
