@lax-wp/design-system 0.11.48 → 0.11.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,6 +73,12 @@ export type TCheckboxUtilities = {
73
73
  selectionDisabledRowIds?: TId[];
74
74
  checkboxMetadata?: Record<string, unknown>;
75
75
  };
76
+ export type TExpandedRowState = {
77
+ isOpen: boolean;
78
+ /** Nested row data when the row is expanded (tree / cascading tables). */
79
+ data?: unknown[];
80
+ level?: number;
81
+ };
76
82
  export interface ITableProps {
77
83
  tableKey: TTableKey;
78
84
  modelName?: string;
@@ -81,7 +87,7 @@ export interface ITableProps {
81
87
  data: any[];
82
88
  rawData?: Record<string, unknown>;
83
89
  inlineEditColumns?: string[];
84
- expandedRows?: Record<string, boolean>;
90
+ expandedRows?: Record<string, TExpandedRowState>;
85
91
  maxLevel?: number;
86
92
  totalItems?: number;
87
93
  showRecordCount?: boolean;
@@ -177,7 +183,7 @@ export interface ITableProps {
177
183
  cascadingTableConfig?: Record<string, unknown>;
178
184
  originalsOnly?: boolean;
179
185
  getInnerRowData?: (...args: any[]) => unknown;
180
- setExpandedRows?: (rows: Record<string, boolean>) => void;
186
+ setExpandedRows?: (rows: Record<string, TExpandedRowState>) => void;
181
187
  tooltiptext?: string | ReactNode;
182
188
  checkboxUtilities?: TCheckboxUtilities | null;
183
189
  emptyMessage?: string | ReactNode;