Arguments for the beforeActionClick event. Emitted before an action button is clicked.

Example

onBeforeAction(args: BeforeActionClickArgs<TaskEntity>) {
if (args.action.id === 'delete') {
// Show confirmation before allowing delete
if (!this.confirmDelete(args.event.entity)) {
args.cancel = true;
}
}
}
interface BeforeActionClickArgs<T> {
    action: TimelineAction;
    cancel: boolean;
    domEvent?: Event;
    event: MJTimelineEvent<T>;
    group: TimelineGroup<T>;
    index: number;
}

Type Parameters

  • T = any

    The type of the source record

Hierarchy (view full)

Properties

The action that was clicked.

cancel: boolean

Set to true to cancel the default behavior. Default value is false.

domEvent?: Event

The original DOM event, if applicable. May be undefined for programmatic triggers.

The timeline event being interacted with.

The source group this event belongs to.

index: number

Index of this event within the flattened events array.