Skip to content

Commit

Permalink
feat: Extension with custom data types
Browse files Browse the repository at this point in the history
  • Loading branch information
naydav committed Jun 27, 2024
1 parent 3822339 commit 65c1644
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 22 deletions.
66 changes: 55 additions & 11 deletions universal-editor-product-picker/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export default function () {
});
setGuestConnection(guestConnection);

// await guestConnection.host.field.setHeight(1500);
await guestConnection.host.field.setStyles({
current: { paddingBottom: 10 },
parent: { paddingBottom: 10 },
});

})().catch((e) =>
console.log("Extension got the error during initialization:", e)
Expand Down Expand Up @@ -65,16 +68,6 @@ export default function () {
};
}, [guestConnection]);

useEffect(() => {
(async () => {
if (!guestConnection) {
return;
}
// @TODO doesn't work as expected
// await guestConnection.host.field.setHeight(selections.length * 48 + 350);
})();
}, [guestConnection, selections]);

const saveProductField = (value) => {
guestConnection.host.field.onChange(value);
};
Expand Down

0 comments on commit 65c1644

Please sign in to comment.