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

Mouse cursor is not sticking with the resizer when using useFlexLayout with useResizeColumns. #3399

Closed
aravindsurya77 opened this issue Jul 22, 2021 · 5 comments
Labels
Projects

Comments

@aravindsurya77
Copy link

aravindsurya77 commented Jul 22, 2021

Describe the bug
I was trying to create a table with resizable columns and flexLayout. Resizing works fine but the problem is, when resizing, the cursor is not sticking to the resizer and this creates a confusion for the user, cause it is a bad UX.

Provide an example via Code sandbox!
Please open the app in full browser window for a better view
Code: https://codesandbox.io/s/vigorous-raman-xhie9?file=/src/App.js:1444-1457
App: https://xhie9.csb.app/

Steps To Reproduce
Steps to reproduce the behaviour:

  1. Open the app in full window
  2. Resize any column

Expected behaviour
Mouse cursor should always stick with the resizer when resizing

Screen Recording

Screen.Recording.2021-07-22.at.10.46.05.AM.mov

Desktop:

  • OS: macOs Big Sur
  • Browser: Chrome
  • Version: 91.0.4472.164
@aravindsurya77 aravindsurya77 changed the title Mouse cursor is not sticking with the resizer when using useFlexLayout with userResizeColumns. Mouse cursor is not sticking with the resizer when using useFlexLayout with useResizeColumns. Jul 22, 2021
@aravindsurya77
Copy link
Author

Hey @tannerlinsley,

Any idea why this is happening?

@michaelmcshinsky
Copy link

michaelmcshinsky commented Aug 27, 2021

So I fixed the issue for myself for multiple columns resizing together, but not the mouse movement portion. Do fix it, I calculated the width of the table component with an attached ref and then calculated the default width for each column by:

  1. Subtract any column that already had a "width" set from the total width of the table.
  2. Divide the remaining width by the number of columns left over.
  3. Set that number as the default width to all columns that didn't already have a width set.

You can get more complicated by taking into min and max width when setting up the default columns, but that at a minimum will fix the multi-column resize change.

I'd also love to have a fix for the mouse movement issue.

@fseitun fseitun added this to Needs triage in Triage Nov 28, 2021
@tarasmck
Copy link

tarasmck commented Dec 8, 2021

duplication of #2972

@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This issue is being marked as stale (no activity in the last 14 days)

@github-actions github-actions bot added the Stale label Apr 8, 2022
@github-actions
Copy link

github-actions bot commented Apr 8, 2022

This issue has been detected as stale and automatically closed. It's very likely that your issue has remained here this long because it would require breaking changes to v7. React Table v8 is currently in alpha (soon beta!) and already contains bug fixes, performance improvements and architectural changes that likely address this issue.

  • If your v7 issue has been previously labeled as requiring breaking changes, please try the new v8 alpha/beta releases
  • If your v7 issue has not already been labeled as a breaking change, open a new issue.
  • If this was a v8 issue and was closed by mistake, please reopen or leave a comment below.

@github-actions github-actions bot closed this as completed Apr 8, 2022
Triage automation moved this from Needs triage to Closed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Triage
Closed
Development

No branches or pull requests

3 participants