vscode-database-client icon indicating copy to clipboard operation
vscode-database-client copied to clipboard

Double click result header to resize to longest entry

Open tdortman opened this issue 3 years ago • 5 comments

I was wondering if it was possible to be able to instead of having manually resize a column width by dragging it around, also just double click where you would click to drag and and width automatically adjusts to the length of the longest entry in that column? Similar to how programs like excel do it.

Some default limit for this would probably make sense to avoid having a column that's absurdly wide ruin everything.

tdortman avatar Apr 04 '23 01:04 tdortman

The default is to automatically fit the width of the column, but I limited it to a maximum width of 150px. Now the width is not enough to display your data?

cweijan avatar Apr 04 '23 01:04 cweijan

I don't know if it's the fact that my display is running at 1440p, but 150px really doesn't feel like much at all to be honest. Double that or so would be perfect for me but I also realise that'd make things very bad for a lot of other people, hence me asking for the ability for it to auto resize for me when double clicking the header

There's another thing that's been bothering me and that's the fact that when switching between tables, the column width doesn't get reset. So I want to just quickly check some things I'll end up having to manually resize the column

tdortman avatar Apr 04 '23 01:04 tdortman

Thanks for the feedback, I will adjust the width in the next version and add options to control the maximum width.

When the table is switched, the column width will be automatically reset, but if you drag to adjust the width, it will not work.

cweijan avatar Apr 04 '23 01:04 cweijan

Ah, that'd explain why it didn't reset. Thanks for the quick reply!

tdortman avatar Apr 04 '23 01:04 tdortman

Hi, I have added options in version 6.3.2 to control it. image

cweijan avatar Apr 04 '23 05:04 cweijan