Skip to content

Commit ec47eb8

Browse files
刘欢claude
andcommitted
fix: improve virtual table align handling
Use nullish coalescing for safer align fallback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c71b494 commit ec47eb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VirtualTable/BodyGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const Grid = React.forwardRef<GridRef, GridProps>((props, ref) => {
9393
nearest: 'auto',
9494
};
9595

96-
const virtualAlign = align ? alignMap[align] : offset ? 'top' : 'auto';
96+
const virtualAlign = alignMap[align] ?? (offset ? 'top' : 'auto');
9797

9898
listRef.current?.scrollTo({
9999
...restConfig,

0 commit comments

Comments
 (0)