clauderic / clauderic/react-sortable-hoc

Animation offset incorrect when using non-sortable elements between sortable elements

Open
#202 1 comment 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

I have a list of sortable elements between non-sortable elements.

When moving the sortable elements they do not get animated correctly during the sort. They get positioned as if there was no non-sortable elements in-between them (as if they were right next to each other). After the sort is completed the positions are correct.

In my case the non-sortable elements are text headers.

Please see this codepen example:
https://codepen.io/wiredin/pen/wdQeyZ

I believe SortableContainer needs to take into account the actual distance between the elements, not only the height of the element.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.