ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

After the width: 0, srcoll property is set for the table component, if the initial v-show is false and the v-show is changed to true, the table header is still not displayed

Open huangxin290 opened this issue 1 year ago • 0 comments
trafficstars

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.1

Environment

"vue": "^3.2.36"

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Create a table component
  2. Set the width of a column item to 0 and the width of other columns to greater than 0
  3. Set table v-show to false and scroll to y
  4. Change the v-show to true

What is expected?

The contents of the table are displayed normally, such as the table header

What is actually happening?

The header is still not displayed image


I have tried to locate it and found that in the component MeasureCell, the onResize of VCResizeObserver does not trigger the columnResize event for a column of width equal to 0 when the v-show of the table changes to true. The result is that useColumnWidth will still be undefined and the visibility of the table inside the table header will still be hidden. Hopefully this will help you

huangxin290 avatar Jun 06 '24 10:06 huangxin290