Declined
Last Updated: 27 Apr 2021 12:13 by ADMIN

Issue - While restoring the tree list state from local storage any items that were expanded are not re-expanded

Repo - https://github.com/benhysell/BlazorGridPagingIssue

Example Inspired By - https://docs.telerik.com/blazor-ui/components/treelist/state#save-and-load-treelist-state-from-browser-localstorage

Steps to Reproduce

Expected behavior - Elements that had been expanded would be expanded again.

Details

Following the example https://docs.telerik.com/blazor-ui/components/treelist/state#save-and-load-treelist-state-from-browser-localstorage I copied the code into my application, however I wanted to save which items were expanded, so I commented out:

 state.ExpandedItems = null;

Looking at the resulting entries in local storage, it appears the ExpandedItems list is properly saved to local storage.

I added some logging to the OnStateInitHandler so I could see what was happening on load, my desired result was to ensure:

  • If there is nothing in local storage, collapse all items
  • If someone had stored some information in local storage use it

It appears everything is going out to local storage, and coming back in without issue, however the state of the expanded items is not reflected in the control.

 

Declined
Last Updated: 20 Oct 2020 16:08 by ADMIN
Created by: Georgia N.
Comments: 3
Category: TreeList
Type: Bug Report
0

I use Guids to identify data in my application. It is a lot more reliable than using integers; however, it appears as if the TreeList does not support the use of Guids for the Id and ParentId fields when building the list's view.

---

ADMIN EDIT

This was not a bug, it was probably a configuration issue, as the scenario works, so this is marked as "declined". See the thread below for a sample.

---