selectCellParent()
function selectCellParent(cell): ID | null;
Selects the id of the cell this one is embedded in, or null for a
top-level cell. Works for elements and links alike, since any cell can be
embedded.
Parameters​
| Parameter | Type | Description |
|---|---|---|
cell | Computed<CellRecord> | the resolved cell record |
Returns​
ID | null
Example​
import { useCell, selectCellParent } from '@joint/react';
const parentId = useCell(cellId, selectCellParent);