Good afternoon,
I have some problems with a perspective table, if I don't set a column width it should adjust the width automatically but it wrap the text..
In any case if I set a strict width it doesn't work.
This is the result when I don't set a width
and if I set a width it doesn't work
try setting a width
value for the non-strict version. IIRC, it behaves like flex-grow
when in non-strict mode. I think.
I just set for example 200px with the strictWidth disable and it's not working. Something strange things happen in Perspective ![:rofl: :rofl:](https://emoji.discourse-cdn.com/twitter/rofl.png?v=12)
Take out the px, use just 200, not 200px,
perspective put px by default
![image](https://global.discourse-cdn.com/inductiveautomation/original/3X/8/5/855f13be32ccbbb5df07bf23c55cb3981a303081.png)
if you disable strictWidth
, it won't accept the same kind of value as it does in strict mode. As I said, I believe it behaves like flex-grow
. You can't use px
there.
1 Like
Yes, you both are right, if I remove px
I can set the width.
Anyway, why in your opinion the column doesn't adjust the width automatically in no-strict mode?
1 Like
Because it would need to go through its content to figure out what width it needs, and then it brings another batch of problems when you consider that the contents can be virtualized, that you can have pagers, etc.
Set the width you need, disable resizable
, and you'll be fine.
2 Likes
I believe you're right about this. I've run into similar formatting issues before. When I try to add padding (and/or other styles) to different parts of the table, the columns line up with the headers correctly only some of the time. I think it doesn't quite work properly in flex-grow
mode. Is anyone aware of an existing bug report for this?
I work in this way, thank you @pascal.fragnoud ![:+1:t2: :+1:t2:](https://emoji.discourse-cdn.com/twitter/+1/2.png?v=12)