From eba4efa41d5491d37cb7f5dcd39e725f216be793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=E6=8C=AF=E5=87=AF?= Date: Wed, 3 Sep 2025 20:47:01 +0800 Subject: [PATCH] fix: Table columns minWidth props no work when virtualized --- src/VirtualTable/BodyGrid.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/VirtualTable/BodyGrid.tsx b/src/VirtualTable/BodyGrid.tsx index 261805125..2ed5c65c0 100644 --- a/src/VirtualTable/BodyGrid.tsx +++ b/src/VirtualTable/BodyGrid.tsx @@ -57,9 +57,10 @@ const Grid = React.forwardRef((props, ref) => { // ========================== Column ========================== const columnsWidth = React.useMemo<[key: React.Key, width: number, total: number][]>(() => { let total = 0; - return flattenColumns.map(({ width, key }) => { - total += width as number; - return [key, width as number, total]; + return flattenColumns.map(({ width, minWidth, key }) => { + const finalWidth = Math.max((width as number) || 0, (minWidth as number) || 0); + total += finalWidth; + return [key, finalWidth, total]; }); }, [flattenColumns]);