@hzab/list-render 1.6.2 → 1.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.6.2",
3
+ "version": "1.8.1",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -54,7 +54,7 @@ function TableRender(props) {
54
54
  scope: props.schemaScope,
55
55
  formilyRef,
56
56
  });
57
- _fieldList.forEach((field) => {
57
+ _fieldList.forEach((field, colIndex) => {
58
58
  const fieldSchemas = formilyRef.current?.fields;
59
59
  if (field.inTable !== false) {
60
60
  const { name, title } = field;
@@ -121,6 +121,7 @@ function TableRender(props) {
121
121
 
122
122
  columns.push({
123
123
  ..._colConf,
124
+ onCell: (record, rowIndex) => (_colConf?.onCell?.({...record, _field: { ...field, ...(fieldSchemas?.[name] || {}) }}, rowIndex) || {}),
124
125
  title: _title,
125
126
  key: name,
126
127
  dataIndex: name,