schummar-table 0.32.0 → 0.32.1

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.
@@ -146,11 +146,11 @@ export type MemoizedTableTheme<T> = Omit<TableTheme, 'classes' | 'styles' | 'tex
146
146
  };
147
147
  export interface TableProps<T> extends PartialTableTheme<T> {
148
148
  /** The data to be rendered. One item per row. */
149
- items?: T[];
149
+ items?: readonly T[];
150
150
  /** Unique id for each item/row. */
151
151
  id: FunctionWithDeps<(item: T) => Id> | KeyOfType<T, Id>;
152
152
  /** Create a nested structure by assigning parents to items. Child items are hidden until the parent is expanded. */
153
- parentId?: FunctionWithDeps<(item: T) => Id | undefined> | KeyOfType<T, Id | undefined>;
153
+ parentId?: FunctionWithDeps<(item: T) => Id | undefined> | KeyOfType<T, Id | undefined | null>;
154
154
  /** If true for an item, it means that children will be loaded asynchronously as soon as item is expanded. */
155
155
  hasDeferredChildren?: (item: T) => boolean;
156
156
  /** Column definitions. */
@@ -279,7 +279,7 @@ export type InternalTableProps<T> = MemoizedFunctions<Omit<TableProps<T>, 'id' |
279
279
  }>;
280
280
  export type TableItem<T = unknown> = {
281
281
  id: Id;
282
- parentId?: Id;
282
+ parentId?: Id | null;
283
283
  children: TableItem<T>[];
284
284
  value: T;
285
285
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schummar-table",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": "schummar/schummar-table",