Skip to main content

provide-data

Pushes a batch of events into the store. Without reset, incoming records merge by id; with reset: true, the store clears its events and adds only the incoming batch. The existing EventsStore instance is reused. In Pro builds, every call clears the undo/redo history.

Usage

type ProvideDataPayload = {
data: { events: CalendarEvent[] };
reset?: boolean;
};
FieldTypeDescription
data{ events: CalendarEvent[] }Records to ingest.
resetbooleanWhen omitted or false, merge by id. When true, clear the event store and add only these.

Trigger

api.exec("provide-data", { data: { events } });

Replace the full event set:

api.exec("provide-data", { data: { events }, reset: true });

Observe

api.on("provide-data", p => console.log(p.data.events.length, p.reset));

Intercept

api.intercept("provide-data", p => p.data.events.length > 0);

Returning false cancels the ingest before it reaches the store.

Component handler

<Calendar
:events="[]"
:date="new Date()"
:onprovidedata="p => console.log(p.data.events, p.reset)"
/>
  • Dynamic Loading — the range-loading pipeline that dispatches this action.
  • request-data — the range notification that precedes it.
  • exec — programmatic dispatcher for this action.