Skip to content
Diego van Haaster edited this page Mar 9, 2022 · 2 revisions

Event attributes

name The name of the event

value

previous

options

bubbling

chain

path

model

currentModel

collection

currentCollection

Event methods

stopPropagation()

visited(model)

Catalog of Events

Here's the list of built-in events, with arguments. You're also free to trigger your own events on Models and Collections as you see fit.

  • add bubbling ({model, collection, ...}) — when a model is added to a collection.
  • remove bubbling ({model, collection, ...}) — when a model is removed from a collection.
  • update bubbling ({collection, options, ...}) — single event triggered after any number of models have been added, removed or changed in a collection.
  • reset bubbling ({collection, options, ...}) — when the collection's entire contents have been reset.
  • change bubbling ({model, value, previous, ...}) — when a model's attributes have changed.
  • destroy bubbling ({model, collection, ...}) — when a model is destroyed.
  • request ({model_or_collection, value, options}) — when a model or collection has started a request to the server.
  • sync ({model_or_collection, ...}) — when a model or collection has been successfully synced with the server.
  • invalid ({model, value, options, ...}) — when a model's validation fails on the client.
  • attach ({model_or_collection, value, previous, ...}) — when a model or collection is attached to resource.
Clone this wiki locally