Positioning the Newly Added Contact
Explore how to customize Marionette's CollectionView to prepend new contact items at the top of the list without reversing the entire collection. Learn to override attachHtml after rendering the collection, maintain default behavior on reset, and manage collection events to keep views organized and functional.
We'll cover the following...
We'll cover the following...
So far, we've added the “New Contract” button including the functionality. Let’s add one last touch. We’d like to add the new item view at the top of the list instead of it being appended at the bottom.
Positioning the new item at the top
Collection views define an attachHtml function that is used to determine how child views should be ...