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

Column sorting scrolls horizontally #451

Closed
WesleyM77 opened this issue Dec 19, 2018 · 11 comments

Comments

Projects
None yet
2 participants
@WesleyM77
Copy link

commented Dec 19, 2018

Steps to reproduce this issue

  1. Step 1: Sort a column
  2. Then I (sometimes) get unintended horizontal scrolling.

Current behavior

This doesn't happen for every column, but when I find a column that does it, it's reproducible. On a column that presents the issue, when I sort the column, the view will scroll horizontally by a particular amount every time.

Expected behavior

I would expect horizontal scrolling to never occur when I sort a column.

Possible solution

To not scroll horizontally when a column is sorted.

Environment

  • HeidiSQL version: 9.5.0.5332
  • Database system and version: MySQL 5.7.21
  • Operating system: Windows 10 1803 OS build 17134.441
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Dec 19, 2018

Can you please post a screenshot, as I'm not really clear what you mean here. Thanks!

@WesleyM77

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

I actually see what's it's doing now. All of the columns are resizing themselves based on what information is in the first 1000. If there's a lot of rows and the data in columns varies in length drastically, they all adjust and change the width of the rows. Is there a way to set column widths statically rather than dynamically?

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Dec 19, 2018

You mean you want to have all columns at the same default width, and want to manually set their width? No, that's not doable, as that sounds uncomfortable.

@WesleyM77

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

Yeah, I don't see a good way of getting rid of the weird behavior.

@WesleyM77 WesleyM77 closed this Dec 19, 2018

@WesleyM77

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

Would it be possible to have a setting that, when opening a table, the columns width is set to not change dynamically until that table is reopened or a column is adjusted manually?

@WesleyM77 WesleyM77 reopened this Dec 19, 2018

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Dec 19, 2018

You mean Heidi shall remember manually changed column widths, but should not set them automatically according to their content?

Possible - of course. But that makes little sense to me.

Please describe the problem you have with automatic column widths.

@WesleyM77

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

I've attached an example where it almost disappears off the screen.
2018-12-19_15-47-43
So in this example, the columns to the left are all becoming wider and push the column I'm trying to look at off the screen. In a table with many columns, if they all suddenly become wider as a result of sorting, the column isn't in the same place as it was. Maybe the solution is not as I suggested above and would be to try to keep the column in the same location on screen based on it's left-side position.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Dec 20, 2018

Well in that case I suggest Heidi should just remember which column you clicked, then set the x-scroll offset so the clicked column is at the same position as before.

@WesleyM77

This comment has been minimized.

Copy link
Author

commented Dec 20, 2018

That sounds like the best solution.

@ansgarbecker ansgarbecker added enhancement and removed needs-info labels Jan 3, 2019

@ansgarbecker ansgarbecker added this to the v10.1 milestone Jan 3, 2019

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented May 12, 2019

Next build should restore the just clicked column header so it stays at exactly the same position as before the refresh. Please update and report back if that works for you.

@WesleyM77

This comment has been minimized.

Copy link
Author

commented May 13, 2019

Yes! Thank you so much! That works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.