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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
问题现象:
Table冻结表头时,当列表有数据时会导致表头隐藏消失
问题来源:
在4.0.2版本antd中,rc-table的版本引用的是
7.3.0,当引用了7.3.07.3.11之间的rc-table时没问题,而如果自动下载了rc-table 7.3.12版本的话,就会引起异常。7.3.12的rc-table中,
src/Body/index.tsx
中第95行这里,onResize={({ offsetWidth }) => {onColumnResize(columnKey, offsetWidth);}}
使用了offsetWidth作为宽度更新,而在以往版本中是使用width
字段进行更新。此时offsetWidth为undefined,导致表头的宽度都是为undefined,激活了Table组件对表头隐藏的逻辑。解决方案:
在自己项目package.json内,增加"rc-table": "7.3.0",用于锁定rc-table版本号
Beta Was this translation helpful? Give feedback.
All reactions