@zat-design/sisyphus-react 3.13.15-beta.5 → 3.13.15
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.
@@ -105,8 +105,15 @@ export var useTransformColumns = function useTransformColumns(params) {
|
|
105
105
|
newValue = normalize === null || normalize === void 0 ? void 0 : normalize(newValue);
|
106
106
|
}
|
107
107
|
// 根据模式选择值管理方式
|
108
|
-
|
109
|
-
|
108
|
+
if (names) {
|
109
|
+
// 独立字段模式:设置单个字段值 + 触发整体校验
|
110
|
+
form.setFieldValue(columnName, newValue);
|
111
|
+
// 确保触发Group整体的校验
|
112
|
+
internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index);
|
113
|
+
} else {
|
114
|
+
// 数组值模式
|
115
|
+
internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index);
|
116
|
+
}
|
110
117
|
var values = form.getFieldValue(namePath);
|
111
118
|
var originRow = (namePath === null || namePath === void 0 ? void 0 : namePath.length) ? _cloneDeep(values) : undefined;
|
112
119
|
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, args);
|
@@ -113,8 +113,15 @@ var useTransformColumns = exports.useTransformColumns = function useTransformCol
|
|
113
113
|
newValue = normalize === null || normalize === void 0 ? void 0 : normalize(newValue);
|
114
114
|
}
|
115
115
|
// 根据模式选择值管理方式
|
116
|
-
|
117
|
-
|
116
|
+
if (names) {
|
117
|
+
// 独立字段模式:设置单个字段值 + 触发整体校验
|
118
|
+
form.setFieldValue(columnName, newValue);
|
119
|
+
// 确保触发Group整体的校验
|
120
|
+
internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index);
|
121
|
+
} else {
|
122
|
+
// 数组值模式
|
123
|
+
internalChange === null || internalChange === void 0 ? void 0 : internalChange(newValue, args[1], index);
|
124
|
+
}
|
118
125
|
var values = form.getFieldValue(namePath);
|
119
126
|
var originRow = (namePath === null || namePath === void 0 ? void 0 : namePath.length) ? (0, _cloneDeep2.default)(values) : undefined;
|
120
127
|
onChange === null || onChange === void 0 ? void 0 : onChange.apply(void 0, args);
|