We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 654aee4 commit e9c2db3Copy full SHA for e9c2db3
src/Forms/Components/Tree.php
@@ -38,6 +38,14 @@ protected function setUp(): void
38
parent::setUp();
39
40
$this->default([]);
41
+
42
+ $this->afterStateHydrated(function (Tree $component, $state) {
43
+ if (! is_array($state)) {
44
+ $state = [];
45
+ }
46
47
+ $component->state($state);
48
+ });
49
}
50
51
public function getNodes(): array
0 commit comments