Skip to main content

Function: RelationEditor()

RelationEditor(props): Element

Defined in: widgets/editorForms/editRelationForm.tsx:84

Component which allows to build an relation editor by using provided state and callbacks to the nested components.

target must be a RelationLink placed on the canvas.

Parameters

ParameterTypeDescription

props

{ children: (props) => ReactNode; onChangeTarget: (newLink) => void; relation: RelationLink; }

props.children

(props) => ReactNode

Render function to make an editor UI using provided state.

props.onChangeTarget

(newLink) => void

Handler to update the edited link when its endpoint (source or target element) changes.

This is required to be handled because link endpoints cannot be changed directly without re-creating the link itself.

props.relation

RelationLink

Target relation link to edit.

Returns

Element