pivotick - v2.0.1
    Preparing search index...

    Interface PromptDataOptions<TData>

    Options for a modal that collects a whole data payload (not just a label) — EdgeCreateContext.promptData and NodeCreateContext.promptData. Supply either fields (a declarative form, built with the same field system as the node editor) or render + getValues (arbitrary HTML you populate and read yourself). If both are given, render wins.

    interface PromptDataOptions<TData> {
        cancelLabel?: string;
        fields?: FieldConfig[];
        getValues?: () => TData;
        render?: (body: HTMLElement) => void;
        submitLabel?: string;
        title?: string;
    }

    Type Parameters

    • TData
    Index

    Properties

    cancelLabel?: string

    Cancel button label.

    'Cancel'
    
    fields?: FieldConfig[]

    Declarative form fields; the resolved object is keyed by each field's key.

    getValues?: () => TData

    Read the collected values out of your custom rendered body on submit.

    render?: (body: HTMLElement) => void

    Populate the modal body with your own HTML (ignored if fed no getValues).

    submitLabel?: string

    Submit button label.

    'Add'
    
    title?: string

    Modal header.