-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Data Modeling
-
None
Currently we pass the selected state of a field as a prop on the NodeField. This means that anytime we update the field selection, which happens often when a user is clicking about, we re-create and then re-render all of the nodes.
Let's update how we're keeping this field selection state to instead have a separate array passed to the diagram. `SelectedFields`. We can then have a react context which can be used for reading this field selection state in nodes and fields. That way we restrict the re-rendering to happen only when associated fields and nodes are impacted. This will also avoid us going into react flow's state changes.