feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
915 stars 386 forks source link

[Bug] Unable to deselect items in Tree component #1682

Closed subdan closed 6 years ago

subdan commented 6 years ago

Hello, Josh.

I've found bug in Tree component. I'm unable to deslect selected item with code.

I tried to set tree.selectedItem = null but the selectedItem is still selected.

I tried to set tree.selectedLocation = new <int>[]; as you said here but I get this error: RangeError: Error #1125: The index -1 is out of range 0.

How to repeat: Add next code to the initialize method of TreeScreen class of ComponentsExplorer example.

Starling.juggler.delayCall(deselectItems, 5);
function deselectItems():void
{
    trace("yep");
    _tree.selectedItem = null;
    _tree.selectedLocation = new <int>[];
}

Select any item in Tree and wait 5 sec. You will notice that selected item is still selected but the _tree.selectedItem is null.

subdan commented 6 years ago

I noticed that if I scroll the Tree the selected item became unselected.

joshtynjala commented 6 years ago

Confirmed. I'll take a look!

subdan commented 6 years ago

Thanks!