diff --git a/superset-frontend/spec/javascripts/explore/utils_spec.jsx b/superset-frontend/spec/javascripts/explore/utils_spec.jsx index e41db222d..251475a21 100644 --- a/superset-frontend/spec/javascripts/explore/utils_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/utils_spec.jsx @@ -23,7 +23,6 @@ import { buildV1ChartDataPayload, getExploreUrl, getExploreLongUrl, - getDataTablePageSize, shouldUseLegacyApi, getSimpleSQLExpression, } from 'src/explore/exploreUtils'; @@ -202,20 +201,6 @@ describe('exploreUtils', () => { }); }); - describe('getDataTablePageSize', () => { - it('divides samples data into pages dynamically', () => { - let pageSize; - pageSize = getDataTablePageSize(500); - expect(pageSize).toEqual(20); - pageSize = getDataTablePageSize(0); - expect(pageSize).toEqual(50); - pageSize = getDataTablePageSize(1); - expect(pageSize).toEqual(10000); - pageSize = getDataTablePageSize(1000000); - expect(pageSize).toEqual(5); - }); - }); - describe('buildV1ChartDataPayload', () => { it('generate valid request payload despite no registered buildQuery', () => { const v1RequestPayload = buildV1ChartDataPayload({ diff --git a/superset-frontend/src/components/TableView/TableView.tsx b/superset-frontend/src/components/TableView/TableView.tsx index 761a3414b..58b02bd33 100644 --- a/superset-frontend/src/components/TableView/TableView.tsx +++ b/superset-frontend/src/components/TableView/TableView.tsx @@ -56,6 +56,7 @@ const TableViewStyles = styled.div` display: flex; flex-direction: column; justify-content: center; + align-items: center; } .row-count-container { @@ -165,4 +166,4 @@ const TableView = ({ ); }; -export default TableView; +export default React.memo(TableView); diff --git a/superset-frontend/src/components/dataViewCommon/TableCollection.tsx b/superset-frontend/src/components/dataViewCommon/TableCollection.tsx index fe7f8a9b9..1c11f811c 100644 --- a/superset-frontend/src/components/dataViewCommon/TableCollection.tsx +++ b/superset-frontend/src/components/dataViewCommon/TableCollection.tsx @@ -52,9 +52,6 @@ export const Table = styled.table` background: ${({ theme }) => theme.colors.grayscale.light5}; position: sticky; top: 0; - - white-space: nowrap; - &:first-of-type { padding-left: ${({ theme }) => theme.gridUnit * 4}px; } @@ -205,17 +202,17 @@ export const Table = styled.table` Table.displayName = 'table'; -export default function TableCollection({ - getTableProps, - getTableBodyProps, - prepareRow, - headerGroups, - columns, - rows, - loading, - highlightRowId, -}: TableCollectionProps) { - return ( +export default React.memo( + ({ + getTableProps, + getTableBodyProps, + prepareRow, + headerGroups, + columns, + rows, + loading, + highlightRowId, + }: TableCollectionProps) => (