mirror of
https://github.com/inventree/InvenTree.git
synced 2026-04-28 13:54:25 +00:00
@@ -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 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 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 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 minHeight: number - Minimum height of the table (default 300px)
|
||||||
* @param noHeader: boolean - Hide the table header
|
* @param noHeader: boolean - Hide the table header
|
||||||
*/
|
*/
|
||||||
@@ -212,6 +213,7 @@ export type InvenTreeTableProps<T = any> = {
|
|||||||
rowStyle?: (record: T, index: number) => MantineStyleProp | undefined;
|
rowStyle?: (record: T, index: number) => MantineStyleProp | undefined;
|
||||||
modelField?: string;
|
modelField?: string;
|
||||||
onCellContextMenu?: (record: T, event: any) => void;
|
onCellContextMenu?: (record: T, event: any) => void;
|
||||||
|
height?: string | number;
|
||||||
minHeight?: number;
|
minHeight?: number;
|
||||||
noHeader?: boolean;
|
noHeader?: boolean;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -841,7 +841,9 @@ export function InvenTreeTableInternal<T extends Record<string, any>>({
|
|||||||
style={{
|
style={{
|
||||||
stickyHeader: stickyTableHeader ? 'top' : undefined
|
stickyHeader: stickyTableHeader ? 'top' : undefined
|
||||||
}}
|
}}
|
||||||
height={stickyTableHeader ? '80vh' : undefined}
|
height={
|
||||||
|
tableProps.height ?? (stickyTableHeader ? '80vh' : undefined)
|
||||||
|
}
|
||||||
withTableBorder={!tableProps.noHeader}
|
withTableBorder={!tableProps.noHeader}
|
||||||
withColumnBorders
|
withColumnBorders
|
||||||
striped
|
striped
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ export default function BomSubassemblyTable({
|
|||||||
enableColumnSwitching: false,
|
enableColumnSwitching: false,
|
||||||
enableRefresh: false,
|
enableRefresh: false,
|
||||||
enableReports: false,
|
enableReports: false,
|
||||||
|
height: 'auto',
|
||||||
|
minHeight: 150,
|
||||||
params: {
|
params: {
|
||||||
part: partId,
|
part: partId,
|
||||||
substitutes: false,
|
substitutes: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user