@@ -85,7 +85,7 @@ class Tree extends FormComponent
$this->props['data'] = [];
foreach ($treeData as $child) {
$this->props['data'][] = $child instanceof TreeData
- ? $child->build()
+ ? $child->getOption()
: $child;
}
return $this;
@@ -96,7 +96,7 @@ class TreeData implements OptionComponentInterface
$children = [];
foreach ($this->children as $child) {
$children[] = $child instanceof TreeData
$this->props['children'] = $children;