question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Items dragged within a sortable grid are not properly moving according to widths

See original GitHub issue

https://share.getcloudapp.com/yAu6ymWD

In the above, you’ll notice that the calculations seem off. I’m not sure if I’m supposed to be calculating any widths and passing them to the library or if the library should be smartly moving these elements around according to their widths.

The elements are inline-block elements.

Also, I noticed that when I leverage transform: translate3d... CSS that you can noticeably see that the font styling changes… to avoid this, I instead just move them around with top/left CSS.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
claudericcommented, Feb 19, 2021

Did you set the sorting strategy to a no-op?

function disableSortingStrategy() {
  return null;
}

<SortableContext strategy={disableSortingStrategy}>
1reaction
claudericcommented, Feb 18, 2021

Your layout is not predictable, so you’ll need to follow the same strategy outlined here https://github.com/clauderic/dnd-kit/issues/44#issuecomment-757312037 or here https://github.com/clauderic/dnd-kit/issues/44#issuecomment-757324165

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sortable elements with variable size looks weird ... - GitHub
I have an issue when moving an element through elements with variable. ... Items dragged within a sortable grid are not properly moving...
Read more >
jquery - Sortable behaves wrong when CSS3 scale is applied
Basically, positions are correctly calculated, but the items keep width and height values that are not transformed, which is causing the ...
Read more >
jQuery Sortable Documentation - Grid Integration - Kendo UI ...
Grid Integration. You can use the Kendo UI Sortable widget to reorder the items in a Grid by dragging and dropping. Prerequisites. Overview...
Read more >
Row Dragging - JavaScript Data Grid
The property rowDragManaged is set, to tell the grid to move the row as the row is dragged. If a sort (click on...
Read more >
Draggable Elements That Push Others Out Of Way - CSS-Tricks
E.g. click on element, hold down mouse button, drag mouse cursor, element drags with the mouse, release mouse button to release element. Or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found