I'm working with RadListView to try to make an accordion like UI i.e. you click a parent item, it will expand and show x number of children items.
I got the visibility logic working just fine, but it appears that the UI does not refresh until you scroll away from the expanded/collapsed items. I have attached screenshots to illustrate what I mean: the height does not change upon expanding/collapsing. When you scroll away and come back, the UI has updated it. This isn't ideal, but at least implies this is just a side effect of how the RadSideList renders UI updates.
I found a workaround that ALMOST does exactly what I need. I have an onItemSelectedEvent listener method that looks like this:
let listView: RadListView = args.object;
let exp = _.first(listView.getSelectedItems());
exp.show_segments = !exp.show_segments;
exp.segments.forEach((seg) => seg.visible = !seg.visible);
It works like a charm and updates the UI on the spot. The only problem I now face is that it scrolls all the way back up to the top of the list, which is obviously a bit frustrating from a UX perspective if you're expanding/collapsing stuff further down the list. I have also tried using suspendUpdates/resumeUpdates, and I get the same result.
Does anyone know of any way to prevent this scrolling from happening? Is there a different method I should be taking in order to implement an accordion type UI to use with RadListView?
Thanks in advance for your time and help.