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
There is an issue with grid and useWindowAsScrollContainer. It should not be crawling up to first overflow: scroll|auto DOM element. As seen in getScrollingParent(this.container). Result is something like this using grid layout:
Or we could get a prop of some sort for grid layout when scroll is not used at all?
Like isScrollable and then this code:
Currently animateNodes inside SortableContainer.js does transformation and calculation ends up this.containerBoundingRect having to be root element (most websites has overflow scroll somewhere, right?). edgeOffset.left + translate.x > this.containerBoundingRect.width - offset.width
Current workaround, if you want to have non scrollable, simple grid box layout and draggable list is to add <div style={{ overflow: 'auto' }}> around your SortableContainer. And do not forget to set useWindowAsScrollContainer to false.
Thanks knarkunas! Your workaround saved my day. It's the 'overflow: auto' that did the trick.
I didn't have to set useWindowAsScrollContainer to false.
There is an issue with grid and
useWindowAsScrollContainer
. It should not be crawling up to firstoverflow: scroll|auto
DOM element. As seen ingetScrollingParent(this.container)
. Result is something like this using grid layout:Or we could get a
prop
of some sort for grid layout when scroll is not used at all?Like
isScrollable
and then this code:becomes
Currently
animateNodes
insideSortableContainer.js
does transformation and calculation ends upthis.containerBoundingRect
having to be root element (most websites has overflow scroll somewhere, right?).edgeOffset.left + translate.x > this.containerBoundingRect.width - offset.width
Current workaround, if you want to have non scrollable, simple grid box layout and draggable list is to add
<div style={{ overflow: 'auto' }}>
around yourSortableContainer
. And do not forget to setuseWindowAsScrollContainer
tofalse
.Example to reproduce:
https://codesandbox.io/s/serene-dawn-rwpj0
Commit that might be affecting this issue:
#507
The text was updated successfully, but these errors were encountered: