rpbouman / huey

A UI for DuckDB
MIT License
181 stars 14 forks source link

Column widths are reset on update #83

Open rpbouman opened 4 months ago

rpbouman commented 4 months ago

When user manually resizes the column, we should stick to that setting as much as possible. Right now, whenever the pivot table updates, the column headers are re-rendered, and any manual resizing information is forgotten.

For example: user makes query, user changes column width, user adds and applies filter, and column width is reset. Or filter is expanded, boom, column widths get reset.

What would make sense is to reset column widths only when the columns axis itself is changed (ie. items are added / deleted)

rpbouman commented 4 months ago

If we would have a handler to tells us when the user manually tweaked the column width, we could store it in the column tuple. Then on rendering we could use the width stored in the tuple. This would allow the user to keep using their column widths until the column axis has a structural change (ie query items added or removed from the column axis)