I am working on an application based on Backbone and Marionette. I am using composite view to show an table now I want to update multiple child view's together So I want their object and model. So to access them
I read this method. I tried them on composite view object but none of the method is working and throwing the error message
CheckInOutCollectionView.findByIndex is not a function
How can I access the child view object?
If you know the index of the child view:
var child = collectionView.children.findByIndex(0)
If you want to find the child view for a particular model:
var child = collectionView.children.findByModel(model)
This works because CollectionView.prototype.children is a Babysitter ChildViewContainer instance.
This works for CompositeView instances as well because CompositeView extends CollectionView.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With