@@ -1101,6 +1101,45 @@ interface DataTableBaseProps<TValue extends DataTableValueArray> extends Omit<Re
11011101 * @defaultValue 960px
11021102 */
11031103 breakpoint ?: string | undefined ;
1104+ /**
1105+ * Whether to enable cell memoization.
1106+ *
1107+ * When the memoization is enabled, be sure to:
1108+ * 1- Update the value prop (i.e., row data) to trigger a re-render of the cells of a given row.
1109+ * 2- Where necessary, use the spread operator (...) when updating the value prop objs which creates new fresh
1110+ * objects and avoids mutating the same objects.
1111+ *
1112+ * When the memoization is disabled, a re-render of the datatable will trigger a re-render of all cells, which can
1113+ * lead to performance issues with large datasets and is therefore not recommended.
1114+ * @defaultValue true
1115+ */
1116+ cellMemo ?: boolean ;
1117+ /**
1118+ * The cell props to be checked at memoization.
1119+ *
1120+ * Possible cell props are:
1121+ * 'hostName', 'allowCellSelection', 'cellMemo', 'cellMemoProps', 'cellMemoPropsDepth', 'cellClassName', 'checkIcon', 'collapsedRowIcon',
1122+ * 'field', 'resolveFieldData', 'column', 'cProps', 'dataKey', 'editMode', 'editing', 'editingMeta', 'onEditingMetaChange', 'editingKey',
1123+ * 'getEditingRowData', 'expanded', 'expandedRowIcon', 'frozenRow', 'frozenCol', 'alignFrozenCol', 'index', 'isSelectable', 'onCheckboxChange',
1124+ * 'onClick', 'onMouseDown', 'onMouseUp', 'onRadioChange', 'onRowEditCancel', 'onRowEditInit', 'onRowEditSave', 'onRowToggle', 'responsiveLayout',
1125+ * 'rowData', 'rowEditorCancelIcon', 'rowEditorInitIcon', 'rowEditorSaveIcon', 'rowIndex', 'rowSpan', 'selectOnEdit', 'isRowSelected', 'isCellSelected',
1126+ * 'selectionAriaLabel', 'showRowReorderElement', 'showSelectionElement', 'tabIndex', 'getTabIndex', 'tableProps', 'tableSelector', 'value',
1127+ * 'getVirtualScrollerOption', 'ptCallbacks', 'metaData', 'unstyled', 'findNextSelectableCell', 'findPrevSelectableCell', 'findDownSelectableCell',
1128+ * 'findUpSelectableCell', 'focusOnElement', 'focusOnInit', 'updateStickyPosition'
1129+ *
1130+ * IMPORTANT: Including a function to be checked will in general disable the memoization in practice, since functions are
1131+ * compared by reference.
1132+ *
1133+ * @defaultValue ['rowData', 'field', 'allowCellSelection', 'isCellSelected', 'editMode', 'index', 'tabIndex',
1134+ * 'editing', 'expanded', 'editingMeta', 'frozenCol', 'alignFrozenCol']
1135+ */
1136+ cellMemoProps ?: string [ ] ;
1137+ /**
1138+ * The comparison depth when checking cell props (e.g., rowData) at memoization.
1139+ *
1140+ * @defaultValue 1
1141+ */
1142+ cellMemoPropsDepth ?: number ;
11041143 /**
11051144 * Icon to display in the checkbox.
11061145 */
0 commit comments