Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Readonly<Record<string, string>>
    • EventCollection

Index

Events

ADDED: "items-add"

Fired when items are added to the ModelCollection.

example
const list = models.collection();

list.on(Events.ADDED, (items) => {
console.log('new items added:', items);
});

list.add(1, 2, 3); // "new items added: [1, 2, 3]"
REMOVED: "items-remove"

Fired when items are removed from the ModelCollection.

example
const list = models.collection(1, 2, 3);

list.on(Events.REMOVED, (items) => {
console.log('items removed:', items);
});

list.remove(2, 3); // "items removed: [2, 3]"