Skip to content

Commit

Permalink
fix(ui): Default placement of newly opened components is inconsistent (
Browse files Browse the repository at this point in the history
…#244)

Fixes #230
  • Loading branch information
mattrunyon authored Jan 31, 2024
1 parent b12e0b8 commit 8b17e85
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions plugins/ui/src/js/src/layout/ParentItemContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export function useParentItem() {
const layoutManager = useLayoutManager();
const parentContextItem = useContext(ParentItemContext);
const parentItem = useMemo(
() =>
parentContextItem ??
layoutManager.root.contentItems[0] ??
layoutManager.root,
() => parentContextItem ?? layoutManager.root,
[layoutManager.root, parentContextItem]
);
return parentItem;
Expand Down

0 comments on commit 8b17e85

Please sign in to comment.