mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-01-21 08:20:20 +00:00
Fix table size issue with some heuristics
This commit is contained in:
parent
fa460bfba2
commit
5d59c47979
@ -447,6 +447,9 @@ export interface IDocumentsTabComponentProps {
|
||||
// Extend DocumentId to include fields displayed in the table
|
||||
type ExtendedDocumentId = DocumentId & { tableFields?: DocumentsTableComponentItem };
|
||||
|
||||
// This is based on some heuristics
|
||||
const calculateOffset = (columnNumber: number): number => columnNumber * 13.71428571 - 46;
|
||||
|
||||
// Export to expose to unit tests
|
||||
export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabComponentProps> = ({
|
||||
isPreferredApiMongoDB,
|
||||
@ -1901,7 +1904,7 @@ export const DocumentsTabComponent: React.FunctionComponent<IDocumentsTabCompone
|
||||
style={
|
||||
{
|
||||
height: "100%",
|
||||
width: "calc(100% - 50px)",
|
||||
width: `calc(100% + ${calculateOffset(selectedColumnIds.length)}px)`,
|
||||
} /* Fix to make table not resize beyond parent's width */
|
||||
}
|
||||
>
|
||||
|
@ -147,7 +147,7 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
|
||||
aria-label="Select column"
|
||||
size="small"
|
||||
icon={<MoreHorizontalRegular />}
|
||||
style={{ position: "absolute", right: -6 }}
|
||||
style={{ position: "absolute", right: 0 }}
|
||||
/>
|
||||
</MenuTrigger>
|
||||
<MenuPopover>
|
||||
|
Loading…
x
Reference in New Issue
Block a user