@integry/sdk 4.5.21 → 4.5.23

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integry/sdk",
3
- "version": "4.5.21",
3
+ "version": "4.5.23",
4
4
  "description": "Integry SDK",
5
5
  "main": "dist/umd/index.umd.js",
6
6
  "module": "dist/esm/index.csm.js",
@@ -8,6 +8,7 @@ import { isScrolledIntoView } from '@/utils/common';
8
8
  import { searchJSON } from '@/utils/searchJson';
9
9
  import { Input } from '@/components/Input';
10
10
  import { createElement } from 'preact/compat';
11
+ import { createPortal } from 'preact/compat';
11
12
  import { TagOptions } from '../TagOptions';
12
13
  import { ThreeDotLoader } from '../../ThreeDotLoader';
13
14
  import styles from './styles.module.scss';
@@ -219,6 +220,18 @@ const FieldDropdown = (props: FieldMenuProps) => {
219
220
  });
220
221
  }
221
222
 
223
+ const PortalWrapper = () => {
224
+ const containerRef = useRef<HTMLDivElement>(null);
225
+
226
+ useEffect(() => {
227
+ if (containerRef.current) {
228
+ createPortal(tagsComponentRender, containerRef.current);
229
+ }
230
+ }, []);
231
+
232
+ return html`<div ref=${containerRef}></div>`;
233
+ };
234
+
222
235
  return html` <div
223
236
  class=${`${styles.tagMenu} ${enableSearch ? styles.tagMenuWithSearch : ''}`}
224
237
  style=${parentContainer && tagMenyStyleRef?.current
@@ -344,7 +357,7 @@ const FieldDropdown = (props: FieldMenuProps) => {
344
357
  </div>`
345
358
  : html` <div className="${styles.mappedFieldMenu}">
346
359
  ${tagsComponent
347
- ? html`<div>${() => tagsComponentRender}</div>`
360
+ ? html`<${PortalWrapper} />`
348
361
  : html`${Object.keys(
349
362
  !isEditable ? searchJSON(tags, searchValue) : tags,
350
363
  ).length > 0