ant-design-vue
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
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
Steps to reproduce
- Create a table component
- Set the width of a column item to 0 and the width of other columns to greater than 0
- Set table v-show to false and scroll to y
- 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
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