You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sidenote: If I set dragContainer={dragContainerRef}, it logs an error that the dragContainer is invalid because .current is undefined. However, that's easily fixable by using dragContainer={dragContainerRef.current && dragContainerRef} instead.
Great library!
The text was updated successfully, but these errors were encountered:
Be careful that the property is set on the first render and cannot be changed. In doing so, if the ref is null, you pass null during the first render and the value cannot be changed anymore.
I'm trying to set a custom dragContainer according to the docs for autoscrolling: https://paol-imi.github.io/muuri-react/docs/usage/drag-scroll/
However, any value except
null
ordocument.body
does not seem to work.I'm creating a ref from a dif using
useRef
, but without success.The reason I'm using a custom drag container component, is because I do not want the drag container to fill the whole viewport (UI-decision).
I fixed it temporarily by using
onMount
:Sidenote: If I set
dragContainer={dragContainerRef}
, it logs an error that the dragContainer is invalid because.current
is undefined. However, that's easily fixable by usingdragContainer={dragContainerRef.current && dragContainerRef}
instead.Great library!
The text was updated successfully, but these errors were encountered: