From 539ea5e130908a923b047c26878abe09706e1a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BB=BA=E5=B3=B0?= <645381995@qq.com> Date: Sat, 6 Sep 2025 07:26:06 +0800 Subject: [PATCH] fix: use column width --- docs/examples/stickyHeader.tsx | 2 +- src/Body/MeasureCell.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/stickyHeader.tsx b/docs/examples/stickyHeader.tsx index a004c1dba..1b90efd19 100644 --- a/docs/examples/stickyHeader.tsx +++ b/docs/examples/stickyHeader.tsx @@ -150,7 +150,7 @@ const columns3: ColumnType[] = [ dataIndex: 'age', key: '7', }, - { title: 'Column 8', dataIndex: 'address', key: '8' }, + { title: 'Column 8', dataIndex: 'address', width: 200, key: '8' }, { title: 'Column 9', dataIndex: 'name', key: '9' }, { title: 'Column 10', dataIndex: 'address', key: '10' }, { title: 'Column 11', dataIndex: 'address', key: '11' }, diff --git a/src/Body/MeasureCell.tsx b/src/Body/MeasureCell.tsx index 81865c1f1..6a143948a 100644 --- a/src/Body/MeasureCell.tsx +++ b/src/Body/MeasureCell.tsx @@ -25,7 +25,7 @@ export default function MeasureCell({ columnKey, onColumnResize, column }: Measu style={{ paddingTop: 0, paddingBottom: 0, borderTop: 0, borderBottom: 0, height: 0 }} >
- {column?.title || '\xa0'} + {('width' in column ? '' : column?.title) || '\xa0'}