Skip to content

Commit

Permalink
fix(unigraph): favorites bar speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
thesophiaxu committed Mar 30, 2022
1 parent 5163781 commit 2f07fa5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/unigraph-dev-explorer/src/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,10 @@ export function WorkSpace(this: any) {
delete config.undefine;
delete config.id;
}
const uid = await window.unigraph.addObject(
const uid = (window.unigraph as any).leaseUid();
window.unigraph.addObject(
{
uid,
name: node.getName(),
env: 'react-explorer',
view: node.getComponent(),
Expand All @@ -584,11 +586,13 @@ export function WorkSpace(this: any) {
},
},
'$/schema/view',
undefined,
[],
);
await window.unigraph.runExecutable(
'$/executable/add-item-to-list',
{
item: uid[0],
item: uid,
where: '$/entity/favorite_bar',
},
);
Expand Down

0 comments on commit 2f07fa5

Please sign in to comment.