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'd like to store the tree's state (expanded, collapsed) in local storage, but I don't think there are callbacks for these events yet. Would it be possible to add these, or is there another way to achieve this?
The text was updated successfully, but these errors were encountered:
In your parent component that uses x-tree, you could save the state when you're about to destroy the component / leave the route. That way, you don't have to update your localStorage after every single change but in bulk. Use the isExpanded property. That should, work, correct?
Thank you for this suggestion, however I don't think it's a solution for my usage.
The tree component is shown on the left of the Ember app as a navigation sidebar and visible at all times, so the website (tab / browser window) is much more likely to be closed than being navigated away from.
Additionally, users can add new elements to the tree, which currently reloads the whole model and therefore renders a new tree with the newly inserted element. This also resets the isExpanded properties, i.e. all collapsed elements then suddenly expand again.
I'd like to store the tree's state (expanded, collapsed) in local storage, but I don't think there are callbacks for these events yet. Would it be possible to add these, or is there another way to achieve this?
The text was updated successfully, but these errors were encountered: