mirror of
https://github.com/apache/superset.git
synced 2026-04-27 12:05:24 +00:00
perf: Optimize performance of Results and Samples tables on Explore (#12257)
This commit is contained in:
committed by
GitHub
parent
76b06b215f
commit
fd15dff60e
@@ -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) => (
|
||||
<Table
|
||||
{...getTableProps()}
|
||||
className="table table-hover"
|
||||
@@ -314,5 +311,5 @@ export default function TableCollection({
|
||||
})}
|
||||
</tbody>
|
||||
</Table>
|
||||
);
|
||||
}
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user