fan-standard-comp 3.2.9 → 3.2.10
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/dist/fan-standard-comp.umd.js +1 -1
- package/es/FormComp/RenderItemGroup/index.d.ts +1 -0
- package/es/StandardForm/index.d.ts +1 -0
- package/es/StandardForm/index.js +9 -4
- package/lib/FormComp/RenderItemGroup/index.d.ts +1 -0
- package/lib/StandardForm/index.d.ts +1 -0
- package/lib/StandardForm/index.js +9 -4
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ export interface StandardFormProps {
|
|
|
26
26
|
postfix?: React.ReactNode;
|
|
27
27
|
prefix?: React.ReactNode;
|
|
28
28
|
displayLayout?: any;
|
|
29
|
+
itemGroupConfig?: object;
|
|
29
30
|
[k: string]: any;
|
|
30
31
|
}
|
|
31
32
|
declare const StandardForm: React.ForwardRefExoticComponent<Omit<StandardFormProps, "ref"> & React.RefAttributes<unknown>>;
|
package/es/StandardForm/index.js
CHANGED
|
@@ -40,7 +40,9 @@ var StandardForm = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
40
40
|
postfix = props.postfix,
|
|
41
41
|
fieldSize = props.fieldSize,
|
|
42
42
|
displayLayout = props.displayLayout,
|
|
43
|
-
|
|
43
|
+
_props$itemGroupConfi = props.itemGroupConfig,
|
|
44
|
+
itemGroupConfig = _props$itemGroupConfi === void 0 ? {} : _props$itemGroupConfi,
|
|
45
|
+
baseProps = __rest(props, ["formItemGroup", "className", "initialValues", "layout", "grid", "getFormFields", "fieldStatus", "onSubmit", "confirmText", "onCancel", "cancelText", "actionAlign", "actionGroup", "onFinishFailed", "children", "prefix", "postfix", "fieldSize", "displayLayout", "itemGroupConfig"]);
|
|
44
46
|
var _Form$useForm = _Form.useForm(),
|
|
45
47
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
46
48
|
initForm = _Form$useForm2[0];
|
|
@@ -138,14 +140,17 @@ var StandardForm = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
138
140
|
onFinish: onFormFinish,
|
|
139
141
|
onFinishFailed: onFormFinishFailed,
|
|
140
142
|
scrollToFirstError: true
|
|
141
|
-
}), prefix, children, /*#__PURE__*/React.createElement(React.Fragment, null, formItemGroup.length > 0 ? /*#__PURE__*/React.createElement(RenderItemGroup, {
|
|
143
|
+
}), prefix, children, /*#__PURE__*/React.createElement(React.Fragment, null, formItemGroup.length > 0 ? /*#__PURE__*/React.createElement(RenderItemGroup, Object.assign({
|
|
142
144
|
itemGroup: formItemGroup,
|
|
143
145
|
fieldSize: fieldSize,
|
|
144
146
|
displayLayout: displayLayout,
|
|
145
|
-
|
|
147
|
+
form: initForm,
|
|
148
|
+
doUpdateFormFields: function doUpdateFormFields() {
|
|
149
|
+
return forceUpdateForm();
|
|
150
|
+
},
|
|
146
151
|
size: gridSize,
|
|
147
152
|
layout: layout,
|
|
148
153
|
fieldStatus: fieldStatus
|
|
149
|
-
}) : null, renderActionGroup()), postfix);
|
|
154
|
+
}, itemGroupConfig)) : null, renderActionGroup()), postfix);
|
|
150
155
|
});
|
|
151
156
|
export default StandardForm;
|
|
@@ -26,6 +26,7 @@ export interface StandardFormProps {
|
|
|
26
26
|
postfix?: React.ReactNode;
|
|
27
27
|
prefix?: React.ReactNode;
|
|
28
28
|
displayLayout?: any;
|
|
29
|
+
itemGroupConfig?: object;
|
|
29
30
|
[k: string]: any;
|
|
30
31
|
}
|
|
31
32
|
declare const StandardForm: React.ForwardRefExoticComponent<Omit<StandardFormProps, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -50,7 +50,9 @@ var StandardForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
50
50
|
postfix = props.postfix,
|
|
51
51
|
fieldSize = props.fieldSize,
|
|
52
52
|
displayLayout = props.displayLayout,
|
|
53
|
-
|
|
53
|
+
_props$itemGroupConfi = props.itemGroupConfig,
|
|
54
|
+
itemGroupConfig = _props$itemGroupConfi === void 0 ? {} : _props$itemGroupConfi,
|
|
55
|
+
baseProps = (0, _tslib.__rest)(props, ["formItemGroup", "className", "initialValues", "layout", "grid", "getFormFields", "fieldStatus", "onSubmit", "confirmText", "onCancel", "cancelText", "actionAlign", "actionGroup", "onFinishFailed", "children", "prefix", "postfix", "fieldSize", "displayLayout", "itemGroupConfig"]);
|
|
54
56
|
var _Form$useForm = _form.default.useForm(),
|
|
55
57
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
56
58
|
initForm = _Form$useForm2[0];
|
|
@@ -148,14 +150,17 @@ var StandardForm = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
148
150
|
onFinish: onFormFinish,
|
|
149
151
|
onFinishFailed: onFormFinishFailed,
|
|
150
152
|
scrollToFirstError: true
|
|
151
|
-
}), prefix, children, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formItemGroup.length > 0 ? /*#__PURE__*/_react.default.createElement(_RenderItemGroup.default, {
|
|
153
|
+
}), prefix, children, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formItemGroup.length > 0 ? /*#__PURE__*/_react.default.createElement(_RenderItemGroup.default, Object.assign({
|
|
152
154
|
itemGroup: formItemGroup,
|
|
153
155
|
fieldSize: fieldSize,
|
|
154
156
|
displayLayout: displayLayout,
|
|
155
|
-
|
|
157
|
+
form: initForm,
|
|
158
|
+
doUpdateFormFields: function doUpdateFormFields() {
|
|
159
|
+
return forceUpdateForm();
|
|
160
|
+
},
|
|
156
161
|
size: gridSize,
|
|
157
162
|
layout: layout,
|
|
158
163
|
fieldStatus: fieldStatus
|
|
159
|
-
}) : null, renderActionGroup()), postfix);
|
|
164
|
+
}, itemGroupConfig)) : null, renderActionGroup()), postfix);
|
|
160
165
|
});
|
|
161
166
|
var _default = exports.default = StandardForm;
|