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?
optionalcancelLabel:string
Defined in: interfaces/InterractionCallbacks.ts:376
Cancel button label.
Default
'Cancel'fields?
optionalfields:FieldConfig[]
Defined in: interfaces/InterractionCallbacks.ts:378
Declarative form fields; the resolved object is keyed by each field's key.
getValues()?
optionalgetValues: () =>TData
Defined in: interfaces/InterractionCallbacks.ts:382
Read the collected values out of your custom rendered body on submit.
Returns
TData
render()?
optionalrender: (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?
optionalsubmitLabel:string
Defined in: interfaces/InterractionCallbacks.ts:374
Submit button label.
Default
'Add'title?
optionaltitle:string
Defined in: interfaces/InterractionCallbacks.ts:372
Modal header.