Fix format, update snapshots

This commit is contained in:
Laurent Nguyen 2024-08-07 09:36:48 +02:00
parent c141e2612b
commit 1e10273510
3 changed files with 52 additions and 34 deletions

View File

@ -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";
@ -2029,8 +2029,8 @@ export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabCompone
</div>
</Allotment.Pane>
</Allotment>
</div >
</div >
</CosmosFluentProvider >
</div>
</div>
</CosmosFluentProvider>
);
};

View File

@ -414,8 +414,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
checkboxIndicator={{ "aria-label": "Select all rows " }}
/>
)}
{
columns.map((column) => (
{columns.map((column) => (
<TableHeaderCell
className={styles.tableCell}
key={column.columnId}
@ -424,10 +423,9 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
>
{column.renderHeaderCell()}
</TableHeaderCell>
))
}
</TableRow >
</TableHeader >
))}
</TableRow>
</TableHeader>
<TableBody>
<List
height={size !== undefined ? size.height - LayoutConstants.rowHeight /* table header */ : 0}
@ -440,6 +438,6 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
{RenderRow}
</List>
</TableBody>
</Table >
</Table>
);
};

View File

@ -76,17 +76,36 @@ exports[`Documents tab (noSql API) when rendered should render the page 1`] = `
<div
className="___9o87uj0_0000000 ffefeo0"
>
<DocumentsTableComponent
columnHeaders={
<div
style={
{
"idHeader": "id",
"partitionKeyHeaders": [],
"height": "100%",
"width": "calc(100% + -43px)",
}
}
>
<DocumentsTableComponent
columnDefinitions={
[
{
"id": "id",
"isPartitionKey": false,
"label": "id",
},
]
}
isSelectionDisabled={true}
items={[]}
onColumnResize={[Function]}
onColumnSelectionChange={[Function]}
onItemClicked={[Function]}
onRefreshTable={[Function]}
onSelectedRowsChange={[Function]}
selectedColumnIds={
[
"id",
]
}
selectedRows={
Set {
0,
@ -95,6 +114,7 @@ exports[`Documents tab (noSql API) when rendered should render the page 1`] = `
/>
</div>
</div>
</div>
</Allotment.Pane>
<Allotment.Pane
minSize={300}