I would like to adapt column width to the minimal value depending on the cell content

I would like to adapt column width to the minimal value depending on the cell content

trucmuche2005trucmuche2005 Posts: 71Questions: 22Answers: 2

Hello,

I use datatable on a responsive layout with Bootstrap v4.
In the 4th column of my table, I have buttons who are only icons for small screens and which are texts for wide screens. So the width of the cells in the 4th column are the same in each row, but their width depends of the screen size.

I did not found how to set the 4th column width to the "minimum value" needed by the cell content.
I would like to do this to ensure that the other columns have the maximum of space available...

Could you help me please ?

Thanks !

T.

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.