View as Markdown

API reference: @salmonui/scheduler

SchedulerDialogContextinterface

import type { SchedulerDialogContext } from '@salmonui/scheduler';
interface SchedulerDialogContext<Row = unknown> {
    readonly isNew: boolean;
    readonly values: Readonly<Record<string, unknown>>;
    readonly setValue: (role: string, value: unknown) => void;
    readonly errors: Readonly<Record<string, string>>;
    readonly row: Row | null;
    readonly save: () => void;
    readonly cancel: () => void;
    readonly delete: () => void;
}
SchedulerDialogContext members (8)
NameSignatureDescription
isNewreadonly isNew: boolean;
valuesreadonly values: Readonly<Record<string, unknown>>;

The editor values by role (title, start, end, ...), with resource fields and the row's other properties by their own names; setValue on such a name writes that property.

setValuereadonly setValue: (role: string, value: unknown) => void;
errorsreadonly errors: Readonly<Record<string, string>>;
rowreadonly row: Row | null;
savereadonly save: () => void;
cancelreadonly cancel: () => void;
deletereadonly delete: () => void;