table icon indicating copy to clipboard operation
table copied to clipboard

虚拟滚动时,固定列阴影消失

Open hairgc opened this issue 1 year ago • 2 comments

当开启虚拟滚动时,固定列为按照预期设置阴影效果

原因是虚拟滚动时,触发onInternalScroll事件时传入的currentTarget为virtuallist组件的ref, https://github.com/react-component/table/blob/f968c9edd2b4bb03ed46960fa4b98f527d312f9c/src/Table.tsx#L441-L443

导致内部未正常获取到scrollWidth, clientWidth,拿到的是undefined https://github.com/react-component/table/blob/f968c9edd2b4bb03ed46960fa4b98f527d312f9c/src/Table.tsx#L457-L465

应当优化scrollWidth, clientWidth获取逻辑,虚拟滚动时可以优先从scrollHeaderRef.current获取 https://github.com/react-component/table/blob/f968c9edd2b4bb03ed46960fa4b98f527d312f9c/src/Table.tsx#L457

hairgc avatar May 08 '24 06:05 hairgc

看 antd 官网没问题啊,建议 issue 提到 antd 那边去并提供复现。一般不会关注这边的 issue。

linxianxi avatar May 11 '24 07:05 linxianxi

看 antd 官网没问题啊,建议 issue 提到 antd 那边去并提供复现。一般不会关注这边的 issue。 官网就是有问题的,你进入到虚拟滚动demo,注意鼠标先不要在虚拟滚动列表滚动,直接把边框属性关掉 image

hairgc avatar May 17 '24 07:05 hairgc