-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIO-9201: Fix DataTable in quick inline embed issues #177
Conversation
a64df9c
to
97bdca1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to update jsdocs
polling: boolean = false, | ||
onload?: (ready: Promise<any>) => void, | ||
) { | ||
static requireLibrary(name: string, property: string, src: string | Array<string>, polling: boolean = false, onload?: (ready: Promise<any>) => void, rootElement?: HTMLElement ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update jsdocs with new parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
if (rootElement) { | ||
rootElement.insertAdjacentElement('afterend', element); | ||
return; | ||
} | ||
const { head } = document; | ||
if (head) { | ||
head.appendChild(element); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this attach the element twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, since there's a flag in requireLibrary
function hasResourceBeenAdded
, that would prevent attaching the resource twice
* FIO-9201: Fix quick inline embed issues * FIO-9201: Add small fix * FIO-9201: Add new parameter into jsdocs
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-9201
Description
What changed?
Added possibility to pass DOM element relative to which the script should be inserted, since inline embed uses Shadow Root element and scripts should be applied inside of it to work.
Why have you chosen this solution?
Use this section to justify your choices
Breaking Changes / Backwards Compatibility
Use this section to describe any potentially breaking changes this PR introduces or any effects this PR might have on backwards compatibility
Dependencies
formio/premium
How has this PR been tested?
Manually, since premium module is needed to reproduce failing scenario
Checklist: