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) ********** // ********* Override here for mongo (from MongoDocumentsTab) **********
console.log("isPreferredApiMongoDB", props.isPreferredApiMongoDB);
if (props.isPreferredApiMongoDB) { if (props.isPreferredApiMongoDB) {
loadDocument = (documentId: DocumentId) => loadDocument = (documentId: DocumentId) =>
MongoProxyClient.readDocument( MongoProxyClient.readDocument(

View File

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