Skip to content

Commit

Permalink
Fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcarol committed Dec 13, 2024
1 parent be69fd7 commit bfd6d07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
3 changes: 2 additions & 1 deletion eds/blocks/form/form.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.form.block {
color: var(--calcite-ui-text-1);
background-color: var(--calcite-ui-foreground-1);

&.card-modal {
& > div.one-form {
Expand All @@ -13,7 +14,7 @@
.card-modal-content {
p {
color: white;
background-color: pink;
background-color: black;
}
}
}
Expand Down
26 changes: 6 additions & 20 deletions eds/blocks/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,11 @@ export default async function decorate(block) {

console.log('formProps', formProps);

Check warning on line 92 in eds/blocks/form/form.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement

console.log('window', window, window.initOneForm);
const initResult = window.initOneForm(divId, formProps);
console.log('init result', initResult);

console.log('window', window);

const form = window.oneForm.attachToForm(divId);
form.on('load', (formApi) => {
//Perform API actions here
console.log('form loaded');
});
// const form = window.oneForm.attachToForm(divId);
// form.on('load', (formApi) => {
// //Perform API actions here
// console.log('form loaded');
// });

// workaround for initOneForm requiring the form div to be in the DOM,
// which it is not when loaded as a fragment
Expand All @@ -113,17 +107,9 @@ export default async function decorate(block) {
if (mutation.type === 'childList' && document.getElementById(divId)) {
const initResult = window.initOneForm(divId, formProps);
console.log('init result', initResult);

Check warning on line 109 in eds/blocks/form/form.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
observer.observe(document.body, { childList: true, subtree: true });

const form = window.oneForm.attachToForm(divId);
form.on('load', (formApi) => {
//Perform API actions here
console.log('form loaded');
});
observer.disconnect();
}
});
});


observer.observe(document.body, { childList: true, subtree: true });
}

0 comments on commit bfd6d07

Please sign in to comment.