@digital-ai/dot-components 5.10.0 → 5.11.0

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.
package/index.esm.js CHANGED
@@ -17732,7 +17732,8 @@ const CollapsibleTableBody = ({
17732
17732
  maxWidth: parseCellMaxWidth(column.width),
17733
17733
  minWidth: parseCellMaxWidth(column.minWidth)
17734
17734
  },
17735
- value: row[colId]
17735
+ // Call custom renderer only when item appears in DOM to save resources for huge data sets
17736
+ value: column.render ? column.render(row[colId]) : row[colId]
17736
17737
  }, colId);
17737
17738
  })
17738
17739
  }, `${parentRowKey}-${uid}`);
@@ -18029,7 +18030,8 @@ const DotTableRow = ({
18029
18030
  maxWidth: parseCellMaxWidth(column.width),
18030
18031
  minWidth: parseCellMaxWidth(column.minWidth)
18031
18032
  },
18032
- value: rowData[column.id]
18033
+ // Call custom renderer only when item appears in DOM to save resources for huge data sets
18034
+ value: column.render ? column.render(rowData[column.id]) : rowData[column.id]
18033
18035
  }, column.id);
18034
18036
  })]
18035
18037
  }), isCollapsibleTableExpandValid && renderNestedTable()]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "5.10.0",
3
+ "version": "5.11.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -74,6 +74,7 @@ export interface DotColumnHeader {
74
74
  id: string;
75
75
  label?: string;
76
76
  minWidth?: string;
77
+ render?: (...args: any[]) => ReactNode;
77
78
  sortable?: boolean;
78
79
  truncate?: boolean;
79
80
  width?: string;