ljmotta commented on code in PR #3720:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3720#discussion_r3912792112


##########
packages/xyflow-react-kie-diagram/src/diagram/XyFlowReactKieDiagram.tsx:
##########
@@ -527,8 +562,11 @@ export function XyFlowReactKieDiagram<
                     state.xyFlowReactKieDiagram.newNodeProjection!;
 
                   let foundContainer = false;
-                  for (const potentialContainer of 
reactFlowInstance?.getNodes().reverse() ??
-                    [] /* Respect the nodes z-index */) {
+                  // Use xyFlowStoreApi for synchronous access; nodeLookup 
stores InternalNode<Node> so we cast
+                  // through unknown to Node<NData, N> (safe since NData 
satisfies Record<string, unknown>).
+                  for (const potentialContainer of (
+                    Array.from(xyFlowStoreApi.getState().nodeLookup.values()) 
as unknown as RF.Node<NData, N>[]

Review Comment:
   @Kusuma04-dev It is still being cast to `unkown`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to