From 1e1027351050c920b0fe05f2bf1929834226f9c5 Mon Sep 17 00:00:00 2001 From: Laurent Nguyen Date: Wed, 7 Aug 2024 09:36:48 +0200 Subject: [PATCH] Fix format, update snapshots --- .../Tabs/DocumentsTabV2/DocumentsTabV2.tsx | 12 ++--- .../DocumentsTableComponent.tsx | 28 ++++++----- .../DocumentsTabV2.test.tsx.snap | 46 +++++++++++++------ 3 files changed, 52 insertions(+), 34 deletions(-) diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 14891cbed..486319148 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -24,7 +24,7 @@ import { usePrevious } from "Explorer/Tabs/DocumentsTabV2/SelectionHelper"; import { DocumentsTabPrefs, readDocumentsTabPrefs, - saveDocumentsTabPrefsDebounced + saveDocumentsTabPrefsDebounced, } from "Explorer/Tabs/DocumentsTabV2/documentsTabPrefs"; import { CosmosFluentProvider, LayoutConstants, cosmosShorthands, tokens } from "Explorer/Theme/ThemeUtil"; import { useSelectedNode } from "Explorer/useSelectedNode"; @@ -1014,8 +1014,8 @@ export const DocumentsTabComponent: React.FunctionComponent - - - + + + ); }; diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx index c91d015e4..de39e8791 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx @@ -414,20 +414,18 @@ export const DocumentsTableComponent: React.FC = checkboxIndicator={{ "aria-label": "Select all rows " }} /> )} - { - columns.map((column) => ( - - {column.renderHeaderCell()} - - )) - } - - + {columns.map((column) => ( + + {column.renderHeaderCell()} + + ))} + + = {RenderRow} - + ); }; diff --git a/src/Explorer/Tabs/DocumentsTabV2/__snapshots__/DocumentsTabV2.test.tsx.snap b/src/Explorer/Tabs/DocumentsTabV2/__snapshots__/DocumentsTabV2.test.tsx.snap index 7b9bae63c..d6710b3b1 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/__snapshots__/DocumentsTabV2.test.tsx.snap +++ b/src/Explorer/Tabs/DocumentsTabV2/__snapshots__/DocumentsTabV2.test.tsx.snap @@ -76,23 +76,43 @@ exports[`Documents tab (noSql API) when rendered should render the page 1`] = `
- + + isSelectionDisabled={true} + items={[]} + onColumnResize={[Function]} + onColumnSelectionChange={[Function]} + onItemClicked={[Function]} + onRefreshTable={[Function]} + onSelectedRowsChange={[Function]} + selectedColumnIds={ + [ + "id", + ] + } + selectedRows={ + Set { + 0, + } + } + /> +