0

I'm studying the React Flow library documentation and trying to figure out if there is a way to create my own node that will be a group (I want to implement custom title with styles for node before children nodes). I didn't find anything in the documentation - neither in the Docs/Sub flow section, nor in the Api/Custom nodes.

As a temporary solution for implementing the node title, I created a special node for it and placed it as the first child. But I don't really like this solution.

P.S. Found the same question on library's gitlab repository discussion section, for now without answer - https://github.com/wbkd/react-flow/discussions/2592

P.P.S: On githab answered that any node becomes a parent if its child is given the parentNode parameter. Haven't checked yet.

Schekhovtsov
  • 101
  • 2
  • 10

2 Answers2

0

Indeed: any node can become a group if you specify its id to its children as parentNode

Schekhovtsov
  • 101
  • 2
  • 10
0

Every node can act as a parent. When another uses the id for parentNode, it gets a patent.

the author @moklick said.

大程子
  • 81
  • 1
  • 5