We are using the latest stable version 2 of Antd (and cannot make the jump to version 3 due to version dependency constraints). How do we specify the width of my table columns, ideally to the length of the text in title
property? According to the official table
component docu, there is the obvious property width
for a column
. All the documentation says in English is
Property: width
Description: Width of this column
Type:
string|number
Default: -
1st part of the question: If I specify only a number, what unit is used? I tried different things, but it does not really look like it is dp
as described e.g at What is the default unit for width, height, padding etc in React Native for iOS?
2nd part: If I specify a string, which units can I use? I tried ex
, em
, and px
and none of them seems to work.
The 3rd part of the question: Maybe we overlooked a property of the table
tag which overwrites or limits the usage of width
is a column?
Any input is appreciated, already the translation of the original documentation to English would help. Or explaining the a related Github issue: 'how to set table columns width? the width property is invalid'.
Thanks for your time in advance - a puzzled Antd newbie.