Skip to content

Commit c3c5bfe

Browse files
author
树清
committed
fix: Rectify the case that expandIconColumnIndex is smaller than 0
1 parent f49dd25 commit c3c5bfe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useColumns/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ function useColumns<RecordType>(
176176
// >>> Insert expand column if not exist
177177
if (!cloneColumns.includes(EXPAND_COLUMN)) {
178178
const expandColIndex = expandIconColumnIndex || 0;
179-
if ((expandColIndex && expandColIndex >= 0) || fixed === 'left' || !fixed) {
179+
console.log(expandColIndex);
180+
if (expandColIndex >= 0 && (expandColIndex || fixed === 'left' || !fixed)) {
180181
cloneColumns.splice(expandColIndex, 0, EXPAND_COLUMN);
181182
}
182183
if (fixed === 'right') {

0 commit comments

Comments
 (0)