Can Backbone render a collection in reverse order?

后端 未结 8 1555
猫巷女王i
猫巷女王i 2021-02-09 04:19

I\'m using a Signalr hub to subscribe to events on the server. What an event is dispatched to a hub, its successfully adding the item to a Marionette CollectionView. This, in

8条回答
  •  广开言路
    2021-02-09 04:41

    From what you describe, you don't need to re-render the collection in reverse order. Just add an event for add on your collection in that view and have it call a function that renders the item just added and prepends it to the table.

    this.collection.on('add', this.addItem);
    

提交回复
热议问题