I am using spark List control which is bind to an instance of such class:
[Event(name="collectionChange", type="mx.events.CollectionEvent")]
public class HierarchicalCollectionListAdapter extends EventDispatcher implements IList
{
...
}
I want to make List fully re-draw each time when this collection send “reset” collectionChange event. Now to achieve this, each time after collection update I have to call this code:
var _itemRenderer:IFactory = _list.itemRenderer;
_list.itemRenderer = null;
_list.itemRenderer = _itemRenderer;
Is there any way to do it in more elegant way?
I’ll leave my solution here in case if someone will have same problem.
Best thing that I could do – create extended list control, which will refresh itself each time on collection update. So, create new control, based on spark list and add this code there: