marionettejs's public fiddles
-
Marionette.js. Events. View `triggerMethod`
The `triggerMethod` method fires the named event on the view - any listeners will then be triggered on the event. If there are no listeners, this call will still succeed. All arguments after the first argument will be passed to all event handlers.
-
Marionette.js. CollectionView. Build Trees in Marionette 3
As in tables, trees in Marionette 3 require us to combine `View` and `CollectionView` to build up the tree in a more explicit manner than the implicit version provided by Marionette 2.
-
Marionette.js. CollectionView. Build Trees in Marionette 3
As in tables, trees in Marionette 3 require us to combine `View` and `CollectionView` to build up the tree in a more explicit manner than the implicit version provided by Marionette 2.
-
Marionette.js. CollectionView. Build Trees in Marionette 3
As in tables, trees in Marionette 3 require us to combine `View` and `CollectionView` to build up the tree in a more explicit manner than the implicit version provided by Marionette 2.
-
Marionette.js. CollectionView. Build Tables Using Marionette 3
Marionette 3 doesn't use `CompositeView` any more. We now build tables using `View`s and `regions`.
-
Marionette.js. CollectionView. Rendering Lists
Lists are possibly the simplest use of `CollectionView` - simply set a `childView` option.
-
Marionette.js. CollectionView. Child Event Bubbling
When a child view triggers an event, that event will bubble up one level to the parent collection view.
-
Marionette.js. CollectionView's getViewComparator
Override this method to determine which `viewComparator` to use.
-
Marionette.js. CollectionView's sort
By default the `CollectionView` will maintain a sorted collection's order in the DOM.
-
Marionette.js. CollectionView's removeFilter
This function is actually an alias of `setFilter(null, options)`. It is useful for removing filters. `removeFilter` also accepts `preventRender` as a option.
-
Marionette.js. CollectionView's setFilter
The `setFilter` method modifies the `CollectionView`'s filter attribute, and renders the new `ChildViews` in a efficient way, instead of rendering the whole DOM structure again.
-
Marionette.js. CollectionView's filter
`CollectionView` allows for a custom `filter` option if you want to prevent some of the underlying `collection`'s models from being rendered as child views.
-
Marionette.js. CollectionView's `destroy`
`CollectionView` implements a `destroy` method which automatically destroys its children and cleans up listeners.
-
Marionette.js. CollectionView. Automatic Rendering
After the initial render the collection view binds to the "add", "remove" and "reset" events of the collection that is specified.
-
Marionette.js. CollectionView's. render
The `render` method of the collection view is responsible for rendering the entire collection.
-
Marionette.js. CollectionView's. isEmpty
If you want to control when the empty view is rendered, you can override `isEmpty`
-
Marionette.js. CollectionView's. emptyViewOptions
Similar to childView and childViewOptions, there is an `emptyViewOptions` property that will be passed to the `emptyView` constructor.
-
Marionette.js. CollectionView's. emptyView
When a collection has no children, and you need to render a view other than the list of childViews, you can specify an `emptyView` attribute on your collection view. The `emptyView` just like the [`childView`](#collectionviews-childview) can also be passed as an option on instantiation or can be a function that returns the `emptyView`.
-
Marionette.js. CollectionView's. childViewTriggers
A `childViewTriggers` hash or method permits proxying of child view events without manually setting bindings. The values of the hash should be a string of the event to trigger on the parent.
-
Marionette.js. CollectionView's. childViewEvents
A `childViewEvents` also catches custom events fired by a child view.