clauderic / clauderic/react-sortable-hoc

Grid sorting is not working correctly when the useWindowAsScrollContainer is used and the elements are center aligned with margin

Open
#796 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

Grid sorting is not working correctly when the `useWindowAsScrollContainer` prop is passed whereas the content is center aligned and has margin

## Current Behaviour
Item from 1st row is not moving to 2nd row when a new item is dragged into first row
![issue_in_dnd](https://user-images.githubusercontent.com/3942885/117980459-9b0d6000-b351-11eb-8a4c-323176e4453c.gif)

## Expected Behaviour
Item from 1st row will flow into 2nd row when a new item is dragged into 1st row.

## Possible Solution
1. Distinguish `container` from `scrollContainer`
2. Introduce 2 new props `useWindowAsXScrollContainer` and `useWindowAsYScrollContainer` which will solve this problem by allowing scrolling in only one axis.

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.