Closed pamtbaau closed 8 years ago
By toggled, do you mean something like a one time operation, or more like a state that force the resize of the column whenever a value is changed?
Initially I thought of making the cells fits their content, but I feared the cost was just too great, so I dropped the idea. Looking at other editors (Numbers, Libre Office, Spreadsheet), it appears they don't automatically resize rows and columns either. But having a command that makes this measurement and resize is probably a good start, if the cost is reasonable I'll see how to make that automatically.
Have a look at LibreOffice Calc and double click the column separator between the titles of the columns...
A double click on the right side separator of a column will either expand the column to its max. width or will contract it to its max. width. My preference would be that if width has been set manually, contraction to its set width would be nicer I think.
This is what I would call toggling.
Do you mean 'response time' when talking about costs? Calc needs an eyeblinck for 5000 rows. Maybe it calculates each rows width when loading the csv.
A double click on the right side separator of a column will either expand the column to its max. width or will contract it to its max. width.
Oh! I didn't know that trick, seems nice. So it's like I thought, a one time operation (its not automatically resizing the column when a value in a cell is changed). I'll probably make a command for that and bind that command to a double click on the resizer.
Do you mean 'response time' when talking about costs
Yep, because doing so in a browser mean measuring every cell and hitting the DOM every time (which is slow). Also, in Tablr I don't render cells that are outside of the visible part of the table, which mean I'll have to measure these cells in a dummy element, manipulating the DOM when doing that. I don't think doing it once in a while will be that slow, but I can't be sure. Anyway, it's a problem that can be solved later.
It works beautifully... Thanks!
Would be nice if a column or all columns could be toggled to be narrow or be as wide as the widest value in the column.
Great tool by the way. Worked for long time with Notepad++ on csv's but not to my delight...