@typeolymp/ui-components 3.0.3 → 3.0.4
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.
|
@@ -3,7 +3,7 @@ export declare type ColumnType = {
|
|
|
3
3
|
dataIndex: string;
|
|
4
4
|
title?: string | ReactNode;
|
|
5
5
|
titlePopup?: string | string[];
|
|
6
|
-
render?(value: any, row: any): ReactNode;
|
|
6
|
+
render?(value: any, row: any, index: number): ReactNode;
|
|
7
7
|
align?: "left" | "right" | "center";
|
|
8
8
|
};
|
|
9
9
|
export declare type DataType = {
|
package/build/index.es.js
CHANGED
|
@@ -50351,7 +50351,7 @@ var Table = function (_a) {
|
|
|
50351
50351
|
})] }) }), jsx$1(TableBody, { children: data.length === 0 ? (jsx$1(TableRow, { children: jsx$1(EmptyTableCell, __assign$2({ colSpan: rowSelection ? columns.length + 1 : columns.length }, { children: jsx$1(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) { return (jsxs(TableRow, { children: [rowSelection && (jsx$1(TableCell, { children: jsx$1(Checkbox, { id: rowIndex.toString(), name: rowIndex.toString(), value: row.key, checked: selectedRowKeys.includes(row.key), onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|
|
50352
50352
|
var dataIndex = _a.dataIndex, render = _a.render, align = _a.align;
|
|
50353
50353
|
var data = row[dataIndex];
|
|
50354
|
-
return (jsx$1(TableCell, __assign$2({ align: align }, { children: render ? render(data, row) : data }), "col-".concat(colIndex)));
|
|
50354
|
+
return (jsx$1(TableCell, __assign$2({ align: align }, { children: render ? render(data, row, rowIndex) : data }), "col-".concat(colIndex)));
|
|
50355
50355
|
})] }, "row-".concat(rowIndex))); })) })] }));
|
|
50356
50356
|
};
|
|
50357
50357
|
|