Merge pull request #15448 from Budibase/fix-popover-styling

Fix applying styles to Popover.
This commit is contained in:
Sam Rose 2025-01-28 10:22:32 +00:00 committed by GitHub
commit 189888e03a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -240,7 +240,12 @@ export default function positionDropdown(element: HTMLElement, opts: Opts) {
}
for (const [key, value] of Object.entries(styles)) {
element.style.setProperty(key, value ? `${value}px` : null)
const name = key as keyof Styles
if (value != null) {
element.style[name] = `${value}px`
} else {
element.style[name] = ""
}
}
}