Closed adamsea closed 8 years ago
For a little bit of context, here's some code I used to work around this in the meantime:
this.listenTo(this.collectionView, 'options.set', function(options) {
this.setViewOptions(options);
this.applyBindings();
});
So I can set them after the itemViews are created, but this requires calling applyBindings multiple times and seems inefficient.
For what it's worth, this is where Marionette works really well. Their CollectionView includes exactly this sort of setup behavior.
@adamsea thanks for the input. By all means, please PR!
Hello,
Is there a way to pass options from a collectionView instance to individual itemView instances as they are created? Looking at the following:
https://github.com/gmac/backbone.epoxy/blob/master/backbone.epoxy.js#L693
I see only the model (each collection member) and the collectionView are passed as options. Should there be a specific options object created that could be used to pass along to itemViews? I'd be happy to create a PR if we can agree this functionality is beneficial and find a sane way to accomplish it.
Thanks! -Eric