Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid item shifts leftward unexpectedly when dragging leftward resize handle. #2027

Open
lvboda opened this issue Mar 14, 2024 · 0 comments
Open

Comments

@lvboda
Copy link

lvboda commented Mar 14, 2024

Describe the bug

When enabling isResizable to true and configuring a leftward resize handle (i.e., setting resizeHandles as 'w', 'sw', or 'nw'), dragging a grid item to resize its width leftward results in the grid item itself shifting leftwards. This behavior is unexpected, as I would anticipate the right-hand position to remain fixed while only the left-hand border adjusts with the handle's drag. This issue can be replicated in the official demo.

Your Example Website or App

https://react-grid-layout.github.io/react-grid-layout/examples/0-showcase.html

Steps to Reproduce the Bug or Issue

  1. Set isResizable to true.
  2. Configure resizeHandles to 'w', 'sw', or 'nw'.
  3. Drag a grid item leftward to resize its width.
  4. Observe the grid's position shifting as it moves leftward.

Expected behavior

The expected behavior is that when dragging the grid item leftward, the position of the right-hand side remains fixed while the width adjusts from the left side.

react-grid-layout library version

1.4.1

Operating System Version

macOS

Browser

Chrome

Additional context

No response

Screenshots or Videos

copy_E441EEAA-FBAD-45BC-BDDB-D60BBF4AAA3A.MOV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant