From 875626cde2600b68b1c6be361474345e5326cbf7 Mon Sep 17 00:00:00 2001 From: linxianxi <904492381@qq.com> Date: Sat, 11 May 2024 13:26:26 +0800 Subject: [PATCH] chore: add comment --- src/Header/HeaderRow.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Header/HeaderRow.tsx b/src/Header/HeaderRow.tsx index 43480aac1..211eca560 100644 --- a/src/Header/HeaderRow.tsx +++ b/src/Header/HeaderRow.tsx @@ -60,18 +60,19 @@ const HeaderRow = (props: RowProps) => { additionalProps = cell.column.onHeaderCell(column); } - // If the cell is the previous cell of the scrollbar and resizable, and fixed is not right, then the scrollbar is resizable + // If scrollbar cell is not fixed right, and the previous cell of the scrollbar is resizable, then the scrollbar is resizable const isScrollBarCellAndResizable = column.scrollbar && - (cells[cells.length - 2].column as ColumnType).resizable && - cells[cells.length - 2].column.fixed !== 'right'; + // if scrollbar fixed right, the resize handle of previous cell is on the left, so there is no need to put the handle inside the scrollbar + column.fixed !== 'right' && + (cells[cells.length - 2].column as ColumnType).resizable; // Whether this cell is in the previous cell of the scrollbar - const isScrollBarCellPreviousCell = + const isScrollBarPreviousCell = cells[cells.length - 1].column.scrollbar && cellIndex === cells.length - 2; let resizable: boolean; - if (isScrollBarCellPreviousCell) { + if (isScrollBarPreviousCell) { if (column.fixed === 'right') { resizable = (column as ColumnType).resizable; } else {