- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 621
Open
Description
当开启虚拟滚动时,固定列为按照预期设置阴影效果
原因是虚拟滚动时,触发onInternalScroll事件时传入的currentTarget为virtuallist组件的ref,
Lines 441 to 443 in f968c9e
| const onInternalScroll = useEvent( | |
| ({ currentTarget, scrollLeft }: { currentTarget: HTMLElement; scrollLeft?: number }) => { | |
| const isRTL = direction === 'rtl'; | 
导致内部未正常获取到scrollWidth, clientWidth,拿到的是undefined
Lines 457 to 465 in f968c9e
| const measureTarget = currentTarget || scrollHeaderRef.current; | |
| if (measureTarget) { | |
| const { scrollWidth, clientWidth } = measureTarget; | |
| // There is no space to scroll | |
| if (scrollWidth === clientWidth) { | |
| setPingedLeft(false); | |
| setPingedRight(false); | |
| return; | |
| } | 
应当优化scrollWidth, clientWidth获取逻辑,虚拟滚动时可以优先从scrollHeaderRef.current获取
Line 457 in f968c9e
| const measureTarget = currentTarget || scrollHeaderRef.current; | 
Metadata
Metadata
Assignees
Labels
No labels