Skip to content

Commit 282291f

Browse files
authored
fix: precision for ue (#1246)
1 parent b135dd4 commit 282291f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Cell/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,16 @@ function Cell<RecordType>(props: CellProps<RecordType>) {
143143

144144
const [absScroll, scrollWidth] = scrollInfo;
145145

146-
const showStartShadow = isFixStart && fixedStartShadow && absScroll > fixStart;
147-
const showEndShadow = isFixEnd && fixedEndShadow && scrollWidth - absScroll > fixEnd;
146+
const showStartShadow =
147+
(isFixStart && fixedStartShadow && absScroll) -
148+
// For precision, we not show shadow by default which has better user experience.
149+
(fixStart as number) >=
150+
1;
151+
const showEndShadow =
152+
(isFixEnd && fixedEndShadow && scrollWidth - absScroll) -
153+
// Same as above
154+
(fixEnd as number) >=
155+
1;
148156

149157
return [showStartShadow, showEndShadow];
150158
});

0 commit comments

Comments
 (0)