Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ListExtendedEventsRecord<C>

Events record for CList<C>.

Type Parameters

  • C

Hierarchy

Index

Properties

Emitted right after any other event is emitted.

Listen on this if you want to know each time the Collab emits an event (e.g., so you can refresh a display based on its state) without having to listen on each individual event type.

When using CRuntime, note that this event may be emitted multiple times in the middle of a transaction. You typically want to wait to refresh displays until the next DocEventsRecord.Change event, e.g.:

let isDirty = false;
collab.on("Any", () => { isDirty = true; });
doc.on("Change", () => {
if (isDirty) {
refreshDisplay();
isDirty = false;
}
})

Or, in a React component, use @collabs/react's useCollab.

Delete: ListEvent<C> & { method: "delete" | "archive" }

Emitted when a range of values is deleted or archived, making them no longer present in the list.

This event is not emitted when already-archived values are permanently deleted by CList.delete; that instead emits DeleteArchived.

DeleteArchived: ListArchivedEvent<C>

Emitted when values that were already archived are permanently deleted by CList.delete.

Insert: ListEvent<C> & { method: "insert" | "restore" }

Emitted when a range of values is inserted.

Move: ListMoveEvent<C>

Emitted when a range of values is moved.

MoveArchived: ListMoveArchivedEvent<C>

Emitted when archived values are moved.

Generated using TypeDoc