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