1

In an antd table I am trying to use the columnWidth property in expandable to set the column width as the minimum. In my table the width for the expandable icon column is very big and by default it's quite large for me. I've tried giving a string | number as said so in the documentation but it doesn't seem to work. Is there any other way to set it to a minimum?

expandable={{expandedRowRender: record => <p style={{ margin: 0 }}></p>,
    columnWidth: 1,
    expandRowByClick: true,
}}      

I've tried to use style and margin as 0 but even that isn't making a difference and columnWidth doesn't seem to work.

MuzaffarShaikh
  • 380
  • 3
  • 13
Kashyap
  • 85
  • 2
  • 9
  • Could you provide [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) ? – Andrey Nov 18 '21 at 09:44
  • https://codesandbox.io/s/iek3u?file=/index.js Here is a codesandbox to a basic expandable table. It's from the antd doc, here the column width by default is just a thin strip, but for me it comes as quite a large column. How can I manipulate the column width? The doc apis say columnWidth property can be used but it doesnt seem to work – Kashyap Nov 18 '21 at 09:54
  • Сan you send a link to the code with your issue instead of a link to the documentation in which everything works? Column size depends not only on `columnWidth` but also on other properties of the table – Andrey Nov 18 '21 at 10:22

0 Answers0