Skip to main content

move-event

Fires while an event is being dragged in the time grid. Carries the pointer's normalized 0-100 position within the active section. The store registers no built-in handler for this action - use it for live drag feedback such as tooltips or external previews.

Usage

type MoveEventPayload = {
id: EventID;
x: number;
y: number;
};

type EventID = string | number;
FieldTypeDescription
idEventIDId of the event being dragged.
xnumberPointer position on the section's x-axis (0-100).
ynumberPointer position on the section's y-axis (0-100).

Trigger

api.exec("move-event", { id: 42, x: 25, y: 60 });

Observe

api.on("move-event", p => console.log(p.id, p.x, p.y));

Intercept

api.intercept("move-event", p => p.id !== "locked");

Component handler

<Calendar onMoveEvent={p => console.log(p.id, p.x, p.y)} />
  • update-event — final commit fired at drag end.
  • select-event — selection action that often pairs with drag flows.
  • on — observe drag progress without affecting the store.