@stubber/form-fields 2.0.16 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,7 +27,7 @@ import * as Command from "@stubber/ui/command";
|
|
|
27
27
|
import * as Popover from "@stubber/ui/popover";
|
|
28
28
|
import { createState } from "cmdk-sv";
|
|
29
29
|
import { debounce, isEqual } from "lodash-es";
|
|
30
|
-
import { tick } from "svelte";
|
|
30
|
+
import { onMount, tick } from "svelte";
|
|
31
31
|
import FieldLabel from "../FieldLabel.svelte";
|
|
32
32
|
import FieldMessage from "../FieldMessage.svelte";
|
|
33
33
|
import { clear_value_details, set_value_details } from "../utils";
|
|
@@ -96,10 +96,11 @@ const handle_select = (item_key, trigger) => {
|
|
|
96
96
|
};
|
|
97
97
|
let triggerEl;
|
|
98
98
|
let portalTarget = document.body;
|
|
99
|
-
|
|
100
|
-
const root = triggerEl
|
|
99
|
+
onMount(() => {
|
|
100
|
+
const root = triggerEl?.getRootNode();
|
|
101
101
|
portalTarget = root instanceof ShadowRoot ? root.host : document.body;
|
|
102
|
-
|
|
102
|
+
console.log("portalTarget", portalTarget);
|
|
103
|
+
});
|
|
103
104
|
</script>
|
|
104
105
|
|
|
105
106
|
<div class="invisible hidden" bind:this={triggerEl} />
|