@noya-app/noya-designsystem 0.1.14 → 0.1.15

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": "@noya-app/noya-designsystem",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -22,6 +22,7 @@ import React, {
22
22
  Ref,
23
23
  useCallback,
24
24
  useContext,
25
+ useEffect,
25
26
  useMemo,
26
27
  useRef,
27
28
  useState,
@@ -262,6 +263,12 @@ function SortableRoot({
262
263
  [acceptsDrop, axis, keys, onMoveItem, position.x, position.y]
263
264
  );
264
265
 
266
+ const [mounted, setMounted] = useState(false);
267
+
268
+ useEffect(() => {
269
+ setMounted(true);
270
+ }, []);
271
+
265
272
  return (
266
273
  <SortableItemContext.Provider
267
274
  value={useMemo(
@@ -285,7 +292,8 @@ function SortableRoot({
285
292
  <SortableContext items={keys} strategy={verticalListSortingStrategy}>
286
293
  {children}
287
294
  </SortableContext>
288
- {renderOverlay &&
295
+ {mounted &&
296
+ renderOverlay &&
289
297
  createPortal(
290
298
  <DragOverlay dropAnimation={null}>
291
299
  {activeIndex !== undefined &&