I'm using a PopupListView to render a list of data where the items do not have a "text" property. The list is handling the itemToText function correctly, but looking under the hood, it seems the button expects item.text only...
my code:
mNewItemList = new PopUpListView();
mNewItemList.dataProvider = new ArrayCollection(availableClassObjectArray);
mNewItemList.itemToText = (item:Dynamic) ->
{
return item.name;
};
mNewItemList.popUpAdapter = new DropDownPopUpAdapter();
mNewItemList.layoutData = new HorizontalLayoutData(100, 100);
newItemGroup.addChild(mNewItemList);
// feathers code:
if (this.dataProvider == null || this.dataProvider.length == 0) {
this.button.text = "";
} else {
this.button.text = this.dataProvider.get(this.selectedIndex).text;
}
Can this be modified to reflect the value setup by itemToText?