quasar icon indicating copy to clipboard operation
quasar copied to clipboard

QTable: Option to set auto width in column definition

Open FrittenKeeZ opened this issue 4 years ago • 7 comments
trafficstars

Is your feature request related to a problem? Please describe. Currently you need to override the body cell to set auto-width, which is cumbersome if you're working with dynamically created columns.

Describe the solution you'd like Like you can set so many other properties for a column, it would be nice if you can set auto-width as well.

Describe alternatives you've considered Adding a general slot override for specific columns, having to add content manually as well.

FrittenKeeZ avatar Dec 15 '20 10:12 FrittenKeeZ

Just add a q-table--col-auto-width class to classes and headerClasses props in the column definition.

pdanpdan avatar Dec 15 '20 15:12 pdanpdan

I am closing the issue for inactivity. If this is still a concern, please create a conversation in the Discussions area or feel free to reopen.

hawkeye64 avatar Nov 26 '21 23:11 hawkeye64

I vote for re-opening this.

auto-width is already available on the low level components QTh and QTd, and the solution with q-table--col-auto-width is both inelegant and (most importantly) undocumented.

Adding auto-width to the column definition object solves both, and thus provides an elegant documented solution to a common problem.

beruic avatar Feb 17 '22 07:02 beruic

@hawkeye64 would you consider reopening based on the reasoning above?

beruic avatar Mar 07 '22 10:03 beruic

Sure, sounds reasonable. I am going to let @rstoenescu weigh in. Seems like having an auto-width prop could certainly add the q-table--col-auto-width class where appropriate.

hawkeye64 avatar Mar 08 '22 12:03 hawkeye64

Yeah this would be ideal to have an option to set this on the top level <q-table auto-width .../>

JokerMartini avatar Mar 23 '22 18:03 JokerMartini

I agree that it would be helpful to find a better solution for this.

Raymondo97 avatar Sep 03 '22 04:09 Raymondo97

Is there any update on this feature request @rstoenescu ? And if the team don't want to implement it / doesn't have time - is it greenlighted for someone to make PR for it?

Teo27 avatar Feb 22 '23 09:02 Teo27