ods-component-lib 1.18.154 → 1.18.155
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.
|
@@ -7,6 +7,7 @@ interface IColumnConfig {
|
|
|
7
7
|
allowSorting?: boolean;
|
|
8
8
|
allowSearch?: boolean;
|
|
9
9
|
cellRender?: (data: any) => JSX.Element | string;
|
|
10
|
+
calculateCellValue?: (data: any) => JSX.Element | string;
|
|
10
11
|
calculateFilterExpression?: (value: any, operation: string, target: string) => any;
|
|
11
12
|
format?: string | object;
|
|
12
13
|
}
|
package/dist/index.js
CHANGED
|
@@ -35190,11 +35190,17 @@ var OdsServerSideDatagrid = function OdsServerSideDatagrid(props) {
|
|
|
35190
35190
|
props.columns.forEach(function (col) {
|
|
35191
35191
|
var _item$col$dataField;
|
|
35192
35192
|
var colValue = (_item$col$dataField = item[col.dataField]) === null || _item$col$dataField === void 0 ? void 0 : _item$col$dataField.toString();
|
|
35193
|
-
if (props.applyCellRenderToHeaderFilter
|
|
35193
|
+
if (props.applyCellRenderToHeaderFilter) {
|
|
35194
35194
|
try {
|
|
35195
|
-
|
|
35196
|
-
|
|
35197
|
-
|
|
35195
|
+
if (col.cellRender) {
|
|
35196
|
+
colValue = col.cellRender({
|
|
35197
|
+
value: colValue
|
|
35198
|
+
});
|
|
35199
|
+
} else if (col.calculateCellValue) {
|
|
35200
|
+
var _q;
|
|
35201
|
+
var q = (_q = {}, _q[col.dataField] = item[col.dataField], _q);
|
|
35202
|
+
colValue = col.calculateCellValue(q);
|
|
35203
|
+
}
|
|
35198
35204
|
} catch (error) {}
|
|
35199
35205
|
}
|
|
35200
35206
|
if (colValue && !uniqueValuesByColumn[col.dataField].has(colValue)) {
|