Event emitted when engine data changes (e.g., after a refresh triggered by entity save/delete). Subscribe to an engine's DataChange$ observable to react to data updates.

interface EngineDataChangeEvent {
    affectedEntity?: BaseEntity<unknown>;
    changeType: "delete" | "update" | "refresh" | "add";
    config: BaseEnginePropertyConfig;
    data: unknown[];
}

Properties

affectedEntity?: BaseEntity<unknown>

For 'add', 'update', or 'delete' events, this is the entity that was affected. For 'refresh' events, this is undefined.

changeType: "delete" | "update" | "refresh" | "add"

The type of change that triggered this event.

  • 'refresh': Full data reload from database (via RunView)
  • 'add': Single entity was added to the array (immediate mutation)
  • 'update': Single entity was updated in the array (immediate mutation)
  • 'delete': Single entity was removed from the array (immediate mutation)

The configuration that was refreshed. Contains PropertyName, EntityName, DatasetName, etc.

data: unknown[]

The current data array. This is the same data now available on the engine property.