Closed GalinaLapushinskaya closed 11 months ago
Hi I am not sure what State you mean. If you mean this state: https://balkan.app/FamilyTreeJS/Docs/State we had an issue that was fixed. If not could you please reproduce the issue in Code: https://code.balkan.app/family-tree-js/getting-started#JS
Hello, In our application we are saving nodes for the tree and state for the tree in the database. To do that, we handle tree update with the handler tree.on('update', treeChangeHandle); There we are tracking added/edited/deleted nodes and update our list of nodes accordingly. We also sync state with the local storage, so when user clicks Save, we save the changes to the database: both nodes and state. What we noticed, that if user clicks "Add Member" on one of the nodes, and then clicks Save, the tree breaks on load after that. It happens because State starts to have extra nodes like "_ft_father" or "ft_mother", but this nodes actually do not exist. Sometimes it add these temp nodes to some of the mandatory IDs, but the actual nodes are not there, so on the next load, the tree just breaks. Please advise the best approach. Thanks