Skip to content

Commit 34b1309

Browse files
committed
fix fix typo in isTableLayoutFixed and no-unused-vars
1 parent 6f93189 commit 34b1309

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Table.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
DefaultValueType,
2626
ScrollPosition,
2727
Expander,
28-
Key,
2928
} from './interface';
3029

3130
export interface TableProps<ValueType>
@@ -295,7 +294,7 @@ class Table<ValueType> extends React.Component<TableProps<ValueType>, TableState
295294
// if scroll.x is number/px/% width value, we should fixed table layout
296295
// to avoid long word layout broken issue
297296
if (scroll.x && scroll.x !== true && scroll.x !== 'max-content') {
298-
return false;
297+
return true;
299298
}
300299
return false;
301300
}

tests/__snapshots__/Table.fixedColumns.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
exports[`Table.fixedColumns renders correctly 1`] = `
44
<div
5-
class="rc-table rc-table-scroll-position-left"
5+
class="rc-table rc-table-scroll-position-left rc-table-layout-fixed"
66
>
77
<div
88
class="rc-table-content"

tests/__snapshots__/Table.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ exports[`Table rowKey renders tableLayout 1`] = `
18011801

18021802
exports[`Table scroll renders scroll.x is a number 1`] = `
18031803
<div
1804-
class="rc-table rc-table-scroll-position-left"
1804+
class="rc-table rc-table-scroll-position-left rc-table-layout-fixed"
18051805
>
18061806
<div
18071807
class="rc-table-content"

0 commit comments

Comments
 (0)