Closed Peterragheb closed 1 year ago
It would be great
+1
@Peterragheb I'm not sure sure that would necessarily desirable, e.g. if the table is consequently viewed at a different viewport size.
it would also introduce technical issues, as the individual columns are automatically resized so the total of column widths do not fall below the table width.
i would suggest trying something simpler first, like implementing minWidth
and maxWidth
for individual columns. then seeing how the resultant table behaves. it might be necessary to add an empty buffer column on the far right.
even this would be non-trivial as you would have to find a way to set and communicate those settings to the resize component which operates purely on the table itself. kinda tricky to add ->minWidth and ->maxWidth properties to every nova component and have them actually do something.
Update: I implemented minColumnWidth and maxColumnWidth, it wasn't actually that hard. I smuggled the info in via meta
and wrote it to data-min-column-width
attributes in the headers... from there, a few quick hacks of the resizing javascript had it reading in the values.
Since I also took the opportunity to write the name of the resource into the table
tag, it would be a simple task to use LocalStorage to write unique keys resource
field
width
and thus remember the column size. It could probably even be done without any of the modifications I made.
Well, here it is. It has some extra code from my min/max routines, but yeah... it does work.
We will check it out. Thank you
Can you please make it that the column remembers its last resize width?