Skip to content

Commit

Permalink
revert timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaLysiuk committed Feb 6, 2024
1 parent cc63cba commit 71febcb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/editor/src/state/containers/trees/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ const useTreesStateContainer = createContainer(() => {
.map((a) => a.name);
const nodesRelatedToActiveInterface =
activeNode &&
activeNode.data.type === TypeDefinition.InterfaceTypeDefinition
activeNode.data.type === TypeDefinition.InterfaceTypeDefinition
? allNodes.nodes
.filter((node) => node.interfaces.includes(activeNode.name))
.map((a) => a.name)
.filter((node) => node.interfaces.includes(activeNode.name))
.map((a) => a.name)
: [];
const notBaseTypes = activeNode?.args
.map((a) => getTypeName(a.type.fieldType))
Expand Down Expand Up @@ -241,8 +241,10 @@ const useTreesStateContainer = createContainer(() => {
nodeId !== selectedNodeId?.value?.id ||
_selectedNodeId?.justCreated !== selectedNodeId?.justCreated
) {
DOMEvents.selectNode.trigger(nodeId);
return _setSelectedNodeId(_selectedNodeId);
setTimeout(() => {
DOMEvents.selectNode.trigger(nodeId);
return _setSelectedNodeId(_selectedNodeId);
}, 250);
}
},
[_setSelectedNodeId, allNodes, selectedNodeId?.value?.id, focusMode]
Expand Down

0 comments on commit 71febcb

Please sign in to comment.