You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having issues hydrating a store which contains a tree data structure consisting of TreeNode objects. The problem is that the instances get hydrated as objects instead of TreeNodes. My guess is (after reading #25) that I can't use a class definition for persist within the class itself.
Thats my TreeNode class:
export default class TreeNode {
@persist id = Math.random();
@persist @observable title = "Root";
@persist @observable collapsed = false; // if node should be shown opened
@persist('list', TreeNode) @observable childNodes = []; // <- should this work?
...
Can you help me with this?
The text was updated successfully, but these errors were encountered:
I am having issues hydrating a store which contains a tree data structure consisting of TreeNode objects. The problem is that the instances get hydrated as objects instead of TreeNodes. My guess is (after reading #25) that I can't use a class definition for persist within the class itself.
Thats my TreeNode class:
Can you help me with this?
The text was updated successfully, but these errors were encountered: