Skip to main content
Version: 4.3

PortalSelector

type PortalSelector = 
| string
| null
| ((context) => string | Element | null | undefined);

Resolves the JointJS selector used to find the React portal target node inside a cell view.

  • A string is used directly as the selector for cellView.findNode().
  • null disables all portal rendering.
  • A function receives a PortalSelectorParams and returns:
    • a selector string, look up that node,
    • an Element, use that DOM node directly,
    • null, skip rendering for this cell,
    • undefined (or no return), fall back to joint-react's default selector.