From 34b1309074fe884260963ad9e045aa95de617185 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 18 Oct 2019 12:37:03 +0800 Subject: [PATCH] fix fix typo in isTableLayoutFixed and no-unused-vars --- src/Table.tsx | 3 +-- tests/__snapshots__/Table.fixedColumns.spec.js.snap | 2 +- tests/__snapshots__/Table.spec.js.snap | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Table.tsx b/src/Table.tsx index b4b508a27..2d3ebd58d 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -25,7 +25,6 @@ import { DefaultValueType, ScrollPosition, Expander, - Key, } from './interface'; export interface TableProps @@ -295,7 +294,7 @@ class Table extends React.Component, TableState // if scroll.x is number/px/% width value, we should fixed table layout // to avoid long word layout broken issue if (scroll.x && scroll.x !== true && scroll.x !== 'max-content') { - return false; + return true; } return false; } diff --git a/tests/__snapshots__/Table.fixedColumns.spec.js.snap b/tests/__snapshots__/Table.fixedColumns.spec.js.snap index 1c5bd43ae..e6bea1bb9 100644 --- a/tests/__snapshots__/Table.fixedColumns.spec.js.snap +++ b/tests/__snapshots__/Table.fixedColumns.spec.js.snap @@ -2,7 +2,7 @@ exports[`Table.fixedColumns renders correctly 1`] = `