Skip to content

pivotick v3.0.0


pivotick / InterractionCallbacks / PromptDataOptions

Interface: PromptDataOptions<TData> ​

Defined in: interfaces/InterractionCallbacks.ts:370

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.

Type Parameters ​

TData ​

TData

Properties ​

cancelLabel? ​

optional cancelLabel: string

Defined in: interfaces/InterractionCallbacks.ts:376

Cancel button label.

Default ​

ts
'Cancel'

fields? ​

optional fields: FieldConfig[]

Defined in: interfaces/InterractionCallbacks.ts:378

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


getValues()? ​

optional getValues: () => TData

Defined in: interfaces/InterractionCallbacks.ts:382

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

Returns ​

TData


render()? ​

optional render: (body) => void

Defined in: interfaces/InterractionCallbacks.ts:380

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

Parameters ​

body ​

HTMLElement

Returns ​

void


submitLabel? ​

optional submitLabel: string

Defined in: interfaces/InterractionCallbacks.ts:374

Submit button label.

Default ​

ts
'Add'

title? ​

optional title: string

Defined in: interfaces/InterractionCallbacks.ts:372

Modal header.