Skip to content

Commit

Permalink
fix list not refreshing correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaLysiuk committed Jan 31, 2024
1 parent 06f3d59 commit cd4b3c6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/editor/src/state/containers/relationNodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const useRelationNodes = createContainer(() => {
);

const focusedNodes = useMemo(() => {
setTypeRelatedToFocusedNode([]);
const nId = focusMode;
if (nId) {
const n = allNodes.nodes.find((an) => an.id === nId);
Expand Down Expand Up @@ -128,10 +129,6 @@ const useRelationNodes = createContainer(() => {
});
}, [nodesVisibilityArr, focusedNodes]);

useEffect(() => {
setTypeRelatedToFocusedNode([]);
}, [focusMode]);

const setTypeRelatedNodesToFocusedNode = useCallback(
(node: ParserField) => {
const alreadyExistsInTypeRelatedToFocusedNode =
Expand Down

0 comments on commit cd4b3c6

Please sign in to comment.