Fix table header. Remove debug statement

This commit is contained in:
Laurent Nguyen 2024-04-19 12:36:15 +02:00
parent 73d38439ff
commit ffc5bb6e39
2 changed files with 3 additions and 4 deletions

View File

@ -1133,7 +1133,6 @@ const DocumentsTabComponent: React.FunctionComponent<{
};
// ********* Override here for mongo (from MongoDocumentsTab) **********
console.log("isPreferredApiMongoDB", props.isPreferredApiMongoDB);
if (props.isPreferredApiMongoDB) {
loadDocument = (documentId: DocumentId) =>
MongoProxyClient.readDocument(

View File

@ -105,7 +105,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
createTableColumn<DocumentsTableComponentItem>({
columnId: "id",
compare: (a, b) => a.id.localeCompare(b.id),
renderHeaderCell: () => "id",
renderHeaderCell: () => columnHeaders.idHeader,
renderCell: (item) => <TableCellLayout truncate>{item.id}</TableCellLayout>,
}),
].concat(
@ -117,7 +117,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
renderHeaderCell: () =>
index >= columnHeaders.partitionKeyHeaders.length - 1 ? (
<>
<span>{`/${pkHeader}`}</span>
<span>{pkHeader}</span>
<Button
appearance="transparent"
aria-label="Refresh"
@ -129,7 +129,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
/>
</>
) : (
`/${pkHeader}`
pkHeader
),
renderCell: (item) => {
return <TableCellLayout truncate>{item[pkHeader]}</TableCellLayout>;