mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-01-19 15:30:20 +00:00
Fix initial columns size
This commit is contained in:
parent
8f5479923d
commit
4a3b092b8b
@ -440,7 +440,6 @@ const DocumentsTabComponent: React.FunctionComponent<{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return item;
|
||||
// TODO: for now, merge all the pk values into a single string/column
|
||||
// type: documentId.partitionKeyProperties ? documentId.stringPartitionKeyValues.join(",") : undefined,
|
||||
|
@ -65,19 +65,22 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
|
||||
|
||||
const [activeItemIndex, setActiveItemIndex] = React.useState<number>(undefined);
|
||||
|
||||
const [columnSizingOptions, setColumnSizingOptions] = React.useState<TableColumnSizingOptions>({
|
||||
|
||||
const initialSizingOptions: TableColumnSizingOptions = {
|
||||
id: {
|
||||
idealWidth: 280,
|
||||
// minWidth: 273,
|
||||
},
|
||||
// TODO FIX THIS
|
||||
// type: {
|
||||
// defaultWidth: 100,
|
||||
// // minWidth: 110,
|
||||
// // defaultWidth: 120,
|
||||
// },
|
||||
};
|
||||
columnHeaders.partitionKeyHeaders.forEach((pkHeader) => {
|
||||
initialSizingOptions[pkHeader] = {
|
||||
idealWidth: 200,
|
||||
minWidth: 50,
|
||||
};
|
||||
});
|
||||
|
||||
const [columnSizingOptions, setColumnSizingOptions] = React.useState<TableColumnSizingOptions>(initialSizingOptions);
|
||||
|
||||
const onColumnResize = React.useCallback((_, { columnId, width }) => {
|
||||
setColumnSizingOptions((state) => ({
|
||||
...state,
|
||||
|
Loading…
x
Reference in New Issue
Block a user