You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use a table inside a flex container such as the width is flexible (see the example).
Resize the view (increase the width)
Resize the view (decrease the width)
What is expected?
The columns should resize when the view width decrease, and therefore adapt to the table's parent container.
What is actually happening?
The table columns does not resize, they overflow the table container.
Environment
Info
antd
4.21.7
React
18.2.0
System
Windows 11
Browser
Chromium, Firefox
The problem seem to come from the "colspan" of the column headers.
When I manually remove the "fixed" layout of the sticky header, the table works fine. I guess it has to be a bug in the react code then, not in the style.
Setting the container as "overflow: hidden" fix the issue, but then disable the sticky headers.
The text was updated successfully, but these errors were encountered:
For the one arriving on this issue, the solution is to set min-width: 0; on the flex children (or grid children) that holds the table. I don't understand why, the fix is a bit strange to me but it works :-)
Reproduction link
Steps to reproduce
What is expected?
The columns should resize when the view width decrease, and therefore adapt to the table's parent container.
What is actually happening?
The table columns does not resize, they overflow the table container.
The problem seem to come from the "colspan" of the column headers.
When I manually remove the "fixed" layout of the sticky header, the table works fine. I guess it has to be a bug in the react code then, not in the style.
Setting the container as "overflow: hidden" fix the issue, but then disable the sticky headers.
The text was updated successfully, but these errors were encountered: