Table: Add custom cell rendering option (#70999)

This commit is contained in:
Andrej Ocenas
2023-07-17 11:20:33 +02:00
committed by GitHub
parent 44b55a1ca6
commit bca9fc5293
11 changed files with 82 additions and 30 deletions
@@ -656,6 +656,7 @@ export enum TableCellDisplayMode {
ColorBackground = 'color-background',
ColorBackgroundSolid = 'color-background-solid',
ColorText = 'color-text',
Custom = 'custom',
Gauge = 'gauge',
GradientGauge = 'gradient-gauge',
Image = 'image',
@@ -883,6 +884,10 @@ export interface TableFieldOptions {
displayMode?: TableCellDisplayMode;
filterable?: boolean;
hidden?: boolean; // ?? default is missing or false ??
/**
* Hides any header for a column, usefull for columns that show some static content or buttons.
*/
hideHeader?: boolean;
inspect: boolean;
minWidth?: number;
width?: number;
+3 -1
View File
@@ -4,7 +4,7 @@ package common
// in the table such as colored text, JSON, gauge, etc.
// The color-background-solid, gradient-gauge, and lcd-gauge
// modes are deprecated in favor of new cell subOptions
TableCellDisplayMode: "auto" | "color-text" | "color-background" | "color-background-solid" | "gradient-gauge" | "lcd-gauge" | "json-view" | "basic" | "image" | "gauge" | "sparkline" @cuetsy(kind="enum",memberNames="Auto|ColorText|ColorBackground|ColorBackgroundSolid|GradientGauge|LcdGauge|JSONView|BasicGauge|Image|Gauge|Sparkline")
TableCellDisplayMode: "auto" | "color-text" | "color-background" | "color-background-solid" | "gradient-gauge" | "lcd-gauge" | "json-view" | "basic" | "image" | "gauge" | "sparkline"| "custom" @cuetsy(kind="enum",memberNames="Auto|ColorText|ColorBackground|ColorBackgroundSolid|GradientGauge|LcdGauge|JSONView|BasicGauge|Image|Gauge|Sparkline|Custom")
// Display mode to the "Colored Background" display
// mode for table cells. Either displays a solid color (basic mode)
@@ -86,5 +86,7 @@ TableFieldOptions: {
hidden?: bool // ?? default is missing or false ??
inspect: bool | *false
filterable?: bool
// Hides any header for a column, usefull for columns that show some static content or buttons.
hideHeader?: bool
} @cuetsy(kind="interface")