@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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +6 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Sortable.tsx +9 -1
package/package.json
CHANGED
|
@@ -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
|
-
{
|
|
295
|
+
{mounted &&
|
|
296
|
+
renderOverlay &&
|
|
289
297
|
createPortal(
|
|
290
298
|
<DragOverlay dropAnimation={null}>
|
|
291
299
|
{activeIndex !== undefined &&
|