Oh, it looks like I also forgot to include itemToHeaderText
in the example. For the example collection, the function is actually exactly the same as itemToText
.
groupListView.itemToHeaderText = (item:Dynamic) -> item.text;
EDIT: Actually, I've now changed the example collection to use headerText
as the property name for the group's text, instead of text
. This should make it more clear why there are separate functions for groups and items inside groups. You can continue using text
, or you can change your code to match the new naming scheme. It's up to you. The reason why itemToText
and itemToHeaderText
exist is to ensure that it works with any property name to better support real-world data structures.