我有一个页面需要显示同一集合中以不同方式排序的多个小框。
是否有一个事件可以用来在渲染之前对集合进行排序并在所有 CollectionView 中使用相同的集合?或者我应该以不同的方式排序该集合的 N 个副本并自己连接事件?
当我从集合中添加/删除项目时,我真的希望所有 View 都能更新。
最佳答案
CollectionView allows for a custom viewComparator option if you want your CollectionView's children to be rendered with a different sort order than the underlying Backbone collection uses.
关于javascript - 如何处理共享同一集合的多个 Marionette CollectionView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32798315/