我尝试在SproutCore应用程序中按部门显示联系人列表,并尝试将SC.ListView嵌套在另一个SC.ListView中,但无济于事。
有可能我可以列表,然而,嵌套的‘use SC.GridView to assist’需要在第一个列表的上下文中。如果能实现类似于JQueryUI的accordion小部件,那就更好了!
如有任何建议,我们将不胜感激!
谢谢,M。
发布于 2012-03-21 19:59:44
无论您做什么,都不要将列表嵌套在另一个列表的项中。性能将会非常糟糕。
有一堆选择
1)编写自己的自定义视图。如果你想要花哨的动画,这是最简单的选择。
2)使用带有ListView的TreeController,列表将允许打开适当的项目,以显示子项目。您可以像这样声明树控制器
App.listController = SC.TreeController.create({
treeItemIsExpandedKey: "expanded", // the key that 'opens' the item
treeItemChildrenKey: 'your-children' // the key on an item that contains an array of child items
});https://stackoverflow.com/questions/9802541
复制相似问题