React Diagram - DiagramItem

An object that provides information about an item (shape or connector) in the Diagram UI component.

import { DiagramTypes } from "devextreme-react/diagram"
Type: DiagramTypes.Item

dataItem

Returns the data item that is bound to the diagram item.

Type: any

id

Specifies the item's internal identifier.

Type:

String

itemType

Returns the type of the item.

Type:

ItemType

key

Gets the item's key from a data source.

Selector: Key
Type:

Object

If a user removes an item and then undoes the action, the Diagram inserts the item back and generates a new GUID for its key value. A new GUID is also generated for pasted and cloned items. If you specify key values (IDs in a data source) manually, subscribe to the onInserting data source event to assign the values.