diff --git a/src/frontend/lib/types/Tables.tsx b/src/frontend/lib/types/Tables.tsx index ffb7186e06..798b72329d 100644 --- a/src/frontend/lib/types/Tables.tsx +++ b/src/frontend/lib/types/Tables.tsx @@ -179,6 +179,7 @@ export type RowViewProps = RowAction & RowModelProps; * @param onRowClick : (record: any, index: number, event: any) => void - Callback function when a row is clicked * @param onCellClick : (event: any, record: any, index: number, column: any, columnIndex: number) => void - Callback function when a cell is clicked * @param modelType: ModelType - The model type for the table + * @param height: string | number - Height of the table (default = 'auto') * @param minHeight: number - Minimum height of the table (default 300px) * @param noHeader: boolean - Hide the table header */ @@ -212,6 +213,7 @@ export type InvenTreeTableProps = { rowStyle?: (record: T, index: number) => MantineStyleProp | undefined; modelField?: string; onCellContextMenu?: (record: T, event: any) => void; + height?: string | number; minHeight?: number; noHeader?: boolean; }; diff --git a/src/frontend/src/tables/InvenTreeTable.tsx b/src/frontend/src/tables/InvenTreeTable.tsx index 91e8570fd2..89f1117833 100644 --- a/src/frontend/src/tables/InvenTreeTable.tsx +++ b/src/frontend/src/tables/InvenTreeTable.tsx @@ -841,7 +841,9 @@ export function InvenTreeTableInternal>({ style={{ stickyHeader: stickyTableHeader ? 'top' : undefined }} - height={stickyTableHeader ? '80vh' : undefined} + height={ + tableProps.height ?? (stickyTableHeader ? '80vh' : undefined) + } withTableBorder={!tableProps.noHeader} withColumnBorders striped diff --git a/src/frontend/src/tables/bom/BomSubassemblyTable.tsx b/src/frontend/src/tables/bom/BomSubassemblyTable.tsx index 5e3bc9ea3f..badf18e75d 100644 --- a/src/frontend/src/tables/bom/BomSubassemblyTable.tsx +++ b/src/frontend/src/tables/bom/BomSubassemblyTable.tsx @@ -106,6 +106,8 @@ export default function BomSubassemblyTable({ enableColumnSwitching: false, enableRefresh: false, enableReports: false, + height: 'auto', + minHeight: 150, params: { part: partId, substitutes: false,