Skip to content

Commit

Permalink
Taxonomy UI fixes (#5625)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucanovera committed Dec 19, 2024
1 parent 918f233 commit 71205c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ const TaxonomyInteractiveTree = ({

// Reset the zoom level and center the view when the taxonomy type changes
useEffect(() => {
// Timeout is needed because fitView doesn't work if it's
// A small delay is needed because fitView doesn't work if it's
// called before the nodes are rendered
setTimeout(() => fitView(), 0);
setTimeout(() => fitView(), 150);
}, [fitView, taxonomyType]);

// Root node (the taxonomy type)
Expand Down
2 changes: 1 addition & 1 deletion clients/admin-ui/src/pages/taxonomy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const TaxonomyPage: NextPage = () => {
}
setLastCreatedItemKey(result.data.fides_key);
toast(successToastParams("New label successfully created"));
setTimeout(() => setDraftNewItem(null));
setDraftNewItem(null);
},
[createTrigger, draftNewItem, toast],
);
Expand Down

0 comments on commit 71205c6

Please sign in to comment.