1
我在服务器模式下使用backbone.paginator,版本2.0.2。 在某些时候(在骨干视图文件中),我需要重置PageableCollection状态。Backbone.paginator重置状态
基本上我需要设置currentPage为0或我的默认值,无论是通过重置或以其他方式。由于状态对象是只读的,标准收集方法什么也不做 例如 collection.reset()显然不会被paginator覆盖。
有没有办法做到这一点?
对服务器模式使用'sync'事件。 this.listenTo(this.collection,'sync',this.renderPage);我发现在(http://stackoverflow.com/questions/14676965/backbone-paginator-collection-not-triggering-render-on-reset/36093107#36093107) – Hussain 2016-12-27 08:30:08