glin / reactable

Interactive data tables for R
https://glin.github.io/reactable
Other
612 stars 79 forks source link

Enhancement/Feature Request: allow resizing of columns even if width is specified #374

Open jzadra opened 1 month ago

jzadra commented 1 month ago

Currently if resizeable = TRUE, but there are columns with colDef(width = ) specified, those columns are not resizable. This is the case even if the colDef() for a column with width set also explicitly sets resizable = T.

I think it would be great if there was a way to set the column default width while still allowing them to be resized.

My reasoning:

  1. It seems confusing from a user perspective to be able to resize some columns, and then not be able to on others, as there is no visual indication of why some can be changed and others can't
  2. Just because I want to set a default width does not mean I don't want the users to still have control over it.
glin commented 6 hours ago

I definitely agree, and I'm pretty sure there was a technical reason why fixed widths columns couldn't be resized. Looking back at my notes now, this came up before and I thought there wasn't an easy solution at the time: https://github.com/glin/reactable/issues/223

I bet it is possible to get fixed width columns resizable, but it'll probably take some effort to look into.