Events And Lifecycle
This page documents 33 public symbols exported by @revolist/revogrid-enterprise.
createGanttBeforeTaskChangeValidationHandler
Section titled “createGanttBeforeTaskChangeValidationHandler”function
export function createGanttBeforeTaskChangeValidationHandler<TContext>(options: GanttValidationHandlerOptions<TContext>): (event: CustomEvent<GanttBeforeTaskChangeDetail>) => void;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
options | GanttValidationHandlerOptions<TContext> | Yes | — |
Related types: GanttBeforeTaskChangeDetail, GanttValidationHandlerOptions
GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT
Section titled “GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT”constant
Cancelable event fired before task assignments are modified.
export const GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT: "gantt-before-assignment-change";GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT
Section titled “GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT”constant
Cancelable event fired before a dependency is created, deleted, or edited.
export const GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT: "gantt-before-dependency-change";GANTT_BEFORE_TASK_CHANGE_EVENT
Section titled “GANTT_BEFORE_TASK_CHANGE_EVENT”constant
Cancelable event fired before a task is created, moved, resized, or edited.
export const GANTT_BEFORE_TASK_CHANGE_EVENT: "gantt-before-task-change";GANTT_DEPENDENCY_HOVER_EVENT
Section titled “GANTT_DEPENDENCY_HOVER_EVENT”constant
Fired when the user hovers over a dependency arrow.
export const GANTT_DEPENDENCY_HOVER_EVENT: "gantt-dependency-hover";GANTT_DEPENDENCY_SELECT_EVENT
Section titled “GANTT_DEPENDENCY_SELECT_EVENT”constant
Fired when the user clicks a dependency arrow.
export const GANTT_DEPENDENCY_SELECT_EVENT: "gantt-dependency-select";GANTT_HISTORY_RECORD_EVENT
Section titled “GANTT_HISTORY_RECORD_EVENT”constant
Internal history marker used to record Gantt timeline mutations without replaying them immediately.
export const GANTT_HISTORY_RECORD_EVENT: "gantt-history-record";GANTT_PANEL_RESIZE_EVENT
Section titled “GANTT_PANEL_RESIZE_EVENT”constant
Fired when the user resizes the table/timeline panel divider.
export const GANTT_PANEL_RESIZE_EVENT: "gantt-panel-resize";GANTT_SEARCH_EVENT
Section titled “GANTT_SEARCH_EVENT”constant
Dispatched to filter visible Gantt rows by a free-text query.
export const GANTT_SEARCH_EVENT: "gantt-search";GANTT_TASK_CONVERT_TO_MILESTONE_EVENT
Section titled “GANTT_TASK_CONVERT_TO_MILESTONE_EVENT”constant
Dispatched to convert the selected task into a milestone.
export const GANTT_TASK_CONVERT_TO_MILESTONE_EVENT: "gantt-task-convert-to-milestone";GANTT_TASK_CREATE_EVENT
Section titled “GANTT_TASK_CREATE_EVENT”constant
Dispatched to create a new task. Provide {@link GanttCreateTaskOptions} as the detail.
export const GANTT_TASK_CREATE_EVENT: "gantt-task-create";GANTT_TASK_CREATED_EVENT
Section titled “GANTT_TASK_CREATED_EVENT”constant
Fired after a task is created and selected.
export const GANTT_TASK_CREATED_EVENT: "gantt-task-created";GANTT_TASK_DELETE_EVENT
Section titled “GANTT_TASK_DELETE_EVENT”constant
Dispatched to delete the selected task and its descendants.
export const GANTT_TASK_DELETE_EVENT: "gantt-task-delete";GANTT_TASK_EDIT_EVENT
Section titled “GANTT_TASK_EDIT_EVENT”constant
Dispatched to open editing UI for a task.
export const GANTT_TASK_EDIT_EVENT: "gantt-task-edit";GANTT_TASK_INDENT_EVENT
Section titled “GANTT_TASK_INDENT_EVENT”constant
Dispatched to indent (demote) the selected task one level deeper.
export const GANTT_TASK_INDENT_EVENT: "gantt-task-indent";GANTT_TASK_OUTDENT_EVENT
Section titled “GANTT_TASK_OUTDENT_EVENT”constant
Dispatched to outdent (promote) the selected task one level up.
export const GANTT_TASK_OUTDENT_EVENT: "gantt-task-outdent";GANTT_ZOOM_IN_EVENT
Section titled “GANTT_ZOOM_IN_EVENT”constant
Dispatched to zoom in by one level.
export const GANTT_ZOOM_IN_EVENT: "gantt-zoom-in";GANTT_ZOOM_OUT_EVENT
Section titled “GANTT_ZOOM_OUT_EVENT”constant
Dispatched to zoom out by one level.
export const GANTT_ZOOM_OUT_EVENT: "gantt-zoom-out";GANTT_ZOOM_SET_LEVEL_EVENT
Section titled “GANTT_ZOOM_SET_LEVEL_EVENT”constant
Dispatched to jump directly to a specific zoom level by id.
export const GANTT_ZOOM_SET_LEVEL_EVENT: "gantt-zoom-set-level";GanttBeforeAssignmentChangeAction
Section titled “GanttBeforeAssignmentChangeAction”type
Kind of assignment mutation that triggered the before-change event.
export type GanttBeforeAssignmentChangeAction = 'edit';GanttBeforeAssignmentChangeDetail
Section titled “GanttBeforeAssignmentChangeDetail”interface
Detail payload for the cancelable {@link GANTT_BEFORE_ASSIGNMENT_CHANGE_EVENT}.
Call event.preventDefault() to block the change.
export interface GanttBeforeAssignmentChangeDetail { readonly action: GanttBeforeAssignmentChangeAction; readonly taskId: TaskId; readonly assignments: readonly AssignmentEntity[]; readonly previousAssignments: readonly AssignmentEntity[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
action | "edit" | Yes | — | |
taskId | string | Yes | — | |
assignments | readonly AssignmentEntity[] | Yes | — | |
previousAssignments | readonly AssignmentEntity[] | Yes | — |
Related types: AssignmentEntity, GanttBeforeAssignmentChangeAction, TaskId
GanttBeforeDependencyChangeAction
Section titled “GanttBeforeDependencyChangeAction”type
Kind of dependency mutation that triggered the before-change event.
export type GanttBeforeDependencyChangeAction = 'create' | 'delete' | 'edit' | 'replace';GanttBeforeDependencyChangeDetail
Section titled “GanttBeforeDependencyChangeDetail”interface
Detail payload for the cancelable {@link GANTT_BEFORE_DEPENDENCY_CHANGE_EVENT}.
Call event.preventDefault() to block the change.
export interface GanttBeforeDependencyChangeDetail { readonly action: GanttBeforeDependencyChangeAction; readonly dependencyId: DependencyId | null; readonly dependency: DependencyEntity | null; readonly previousDependency?: DependencyEntity | null; /** Full proposed dependency set for batch replacements. */ readonly dependencies?: readonly DependencyEntity[]; /** Full previous dependency set for batch replacements. */ readonly previousDependencies?: readonly DependencyEntity[];}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
action | GanttBeforeDependencyChangeAction | Yes | — | |
dependencyId | string | null | Yes | — | |
dependency | DependencyEntity | null | Yes | — | |
previousDependency | DependencyEntity | null | undefined | No | — | |
dependencies | readonly DependencyEntity[] | undefined | No | — | Full proposed dependency set for batch replacements. |
previousDependencies | readonly DependencyEntity[] | undefined | No | — | Full previous dependency set for batch replacements. |
Related types: DependencyEntity, DependencyId, GanttBeforeDependencyChangeAction
GanttBeforeTaskChangeAction
Section titled “GanttBeforeTaskChangeAction”type
Kind of task mutation that triggered the before-change event.
export type GanttBeforeTaskChangeAction = 'move' | 'resize' | 'create' | 'edit' | 'progress' | 'split' | 'indent' | 'outdent' | 'delete' | 'convert-to-milestone';GanttBeforeTaskChangeDetail
Section titled “GanttBeforeTaskChangeDetail”interface
Detail payload for the cancelable {@link GANTT_BEFORE_TASK_CHANGE_EVENT}.
Call event.preventDefault() to block the change.
export interface GanttBeforeTaskChangeDetail { readonly action: GanttBeforeTaskChangeAction; readonly taskId: TaskId | null; /** Partial task with proposed values */ readonly changes: Partial<TaskEntity>; /** Previous values of fields being changed */ readonly previousValues: Partial<TaskEntity>; /** Source row that will receive the task-row write, when available. */ readonly sourceRow?: DataType; /** Physical source row index that will receive the mapped write, when available. */ readonly sourceIndex?: number; /** Proposed flat source-row patch for this task row. */ readonly sourcePatch?: Record<string, unknown>; /** Previous source values for the keys in `sourcePatch`. */ readonly previousSourceValues?: Record<string, unknown>;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
action | GanttBeforeTaskChangeAction | Yes | — | |
taskId | string | null | Yes | — | |
changes | Partial<TaskEntity> | Yes | — | Partial task with proposed values |
previousValues | Partial<TaskEntity> | Yes | — | Previous values of fields being changed |
sourceRow | DataType | undefined | No | — | Source row that will receive the task-row write, when available. |
sourceIndex | number | undefined | No | — | Physical source row index that will receive the mapped write, when available. |
sourcePatch | Record<string, unknown> | undefined | No | — | Proposed flat source-row patch for this task row. |
previousSourceValues | Record<string, unknown> | undefined | No | — | Previous source values for the keys in sourcePatch. |
Related types: GanttBeforeTaskChangeAction, TaskEntity, TaskId
GanttBeforeTaskChangeValidator
Section titled “GanttBeforeTaskChangeValidator”type
export type GanttBeforeTaskChangeValidator<TContext = GanttValidationContext> = ( detail: GanttBeforeTaskChangeDetail, context: TContext,) => GanttValidationDecision | boolean;Related types: GanttBeforeTaskChangeDetail, GanttValidationContext, GanttValidationDecision
GanttDependencyInteractionDetail
Section titled “GanttDependencyInteractionDetail”interface
Detail payload for dependency hover/select events.
export interface GanttDependencyInteractionDetail { /** Dependency id, or `null` when the interaction is cleared. */ readonly dependencyId: DependencyId | null; /** Full dependency entity, or `null` when cleared. */ readonly dependency: DependencyEntity | null;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
dependencyId | string | null | Yes | — | Dependency id, or null when the interaction is cleared. |
dependency | DependencyEntity | null | Yes | — | Full dependency entity, or null when cleared. |
Related types: DependencyEntity, DependencyId
GanttExampleCancelableEvent
Section titled “GanttExampleCancelableEvent”interface
export interface GanttExampleCancelableEvent<TDetail> { readonly detail: TDetail; preventDefault(): void;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
detail | TDetail | Yes | — | |
preventDefault() | void | Yes | — |
GanttPanelResizeEventDetail
Section titled “GanttPanelResizeEventDetail”interface
Detail payload for panel resize events.
export interface GanttPanelResizeEventDetail { /** New panel width in pixels. */ readonly width: number;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
width | number | Yes | — | New panel width in pixels. |
GanttSearchEventDetail
Section titled “GanttSearchEventDetail”interface
Detail payload for Gantt search events.
export interface GanttSearchEventDetail { /** Free-text query matched against task rows, assignees, dates, status, tags, and costs. */ readonly query: string;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Free-text query matched against task rows, assignees, dates, status, tags, and costs. |
GanttTaskCreatedEventDetail
Section titled “GanttTaskCreatedEventDetail”interface
Detail payload for the post-create task event.
export interface GanttTaskCreatedEventDetail { /** Created task id. */ readonly taskId: TaskId; /** Created task entity. */ readonly task: TaskEntity; /** * Whether task-created listeners such as the packaged editor should open a * follow-up UI for the new task. */ readonly openEditor?: boolean;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
taskId | string | Yes | — | Created task id. |
task | TaskEntity | Yes | — | Created task entity. |
openEditor | boolean | undefined | No | — | Whether task-created listeners such as the packaged editor should open a follow-up UI for the new task. |
Related types: TaskEntity, TaskId
GanttTaskEditEventDetail
Section titled “GanttTaskEditEventDetail”interface
Detail payload for task edit requests.
export interface GanttTaskEditEventDetail { /** Task id to edit. */ readonly taskId: TaskId;}| Member | Type / return | Required | Default | Description |
|---|---|---|---|---|
taskId | string | Yes | — | Task id to edit. |
Related types: TaskId
validateGanttBeforeTaskChange
Section titled “validateGanttBeforeTaskChange”function
export function validateGanttBeforeTaskChange<TContext>(detail: GanttBeforeTaskChangeDetail, context: TContext, validators: readonly GanttBeforeTaskChangeValidator<TContext>[]): GanttValidationDecision;| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
detail | GanttBeforeTaskChangeDetail | Yes | — | |
context | TContext | Yes | — | |
validators | readonly GanttBeforeTaskChangeValidator<TContext>[] | Yes | — |
Related types: GanttBeforeTaskChangeDetail, GanttBeforeTaskChangeValidator, GanttValidationDecision