From b09a58d2b0f269833d86cac177e07770054e1bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=96=87=E4=BF=8A?= Date: Fri, 7 Nov 2025 23:25:20 +0800 Subject: [PATCH 1/2] fix: Due to precision issues, scrollLeft cannot reach the maximum scrollable width, causing the shadow to remain visible --- src/Cell/index.tsx | 2 +- src/Table.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cell/index.tsx b/src/Cell/index.tsx index 7353aec6d..5978564c3 100644 --- a/src/Cell/index.tsx +++ b/src/Cell/index.tsx @@ -164,7 +164,7 @@ const Cell = (props: CellProps) => { (isFixEnd && fixedEndShadow && scrollWidth - absScroll) - // Same as above (offsetFixedEndShadow as number) >= - 1; + 2; return [showStartShadow, showEndShadow]; }); diff --git a/src/Table.tsx b/src/Table.tsx index a8431dc4c..d2f6cf79c 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -507,7 +507,7 @@ const Table = ( return; } setShadowStart(absScrollStart > 0); - setShadowEnd(absScrollStart < scrollWidth - clientWidth); + setShadowEnd(absScrollStart < scrollWidth - clientWidth - 1); } }, ); From 2e325da38bbe67514b95426637df97f3dfdbd4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=96=87=E4=BF=8A?= Date: Sat, 8 Nov 2025 00:05:39 +0800 Subject: [PATCH 2/2] feat: Alignment threshold --- src/Cell/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cell/index.tsx b/src/Cell/index.tsx index 5978564c3..3d07772b5 100644 --- a/src/Cell/index.tsx +++ b/src/Cell/index.tsx @@ -163,8 +163,8 @@ const Cell = (props: CellProps) => { const showEndShadow = (isFixEnd && fixedEndShadow && scrollWidth - absScroll) - // Same as above - (offsetFixedEndShadow as number) >= - 2; + (offsetFixedEndShadow as number) > + 1; return [showStartShadow, showEndShadow]; });