@zat-design/sisyphus-react 3.3.3-beta.7 → 3.3.3-beta.8

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.
@@ -739,6 +739,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
739
739
  visible: visible
740
740
  }, restModalProps), {}, {
741
741
  children: [_jsx(ProForm, {
742
+ submitOnEnter: true,
742
743
  form: form,
743
744
  columns: formColumns,
744
745
  onFinish: handleSearch,
@@ -56,10 +56,9 @@ var useRules = function useRules(props) {
56
56
  return Promise.resolve();
57
57
  }
58
58
  };
59
- if (type === 'Group' && Array.isArray(names) && !required) {
60
- customRequired = null;
59
+ if (!(type === 'Group' && Array.isArray(names) && !required)) {
60
+ internalRule.rules.push(customRequired);
61
61
  }
62
- internalRule.rules.push(customRequired);
63
62
  }
64
63
  }, [internalRule]);
65
64
  return internalRule;
@@ -168,10 +168,13 @@ var useShouldUpdate = function useShouldUpdate(props) {
168
168
  clearInterval(timerRef.current);
169
169
  }
170
170
  }
171
- // 当校验规则改变的时候 重新执行校验
172
- if (_required !== requiredRef.current || !isEqualWith(rulesRef.current, _rules, customEqualForFun)) {
173
- form.validateFields([name]);
174
- }
171
+ // // 当校验规则改变的时候 重新执行校验 导致: 第一次进页面直接触发校验
172
+ // if (
173
+ // _required !== requiredRef.current ||
174
+ // !isEqualWith(rulesRef.current, _rules, customEqualForFun)
175
+ // ) {
176
+ // form.validateFields([name]);
177
+ // }
175
178
  if (_show !== showRef.current || _disabled !== disabledRef.current || _required !== requiredRef.current || !isEqualWith(rulesRef.current, _rules, customEqualForFun) || !isEqualWith(fieldPropsRef.current, _fieldProps, customEqualForFun) || !isEqualWith(originComponentRef.current, _component, customEqualForFun) || equalDependencies(dependencies, prevValues, _currentValues)) {
176
179
  showRef.current = _show;
177
180
  disabledRef.current = _disabled;
@@ -740,6 +740,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
740
740
  visible: visible
741
741
  }, restModalProps), {}, {
742
742
  children: [(0, _jsxRuntime.jsx)(_index.ProForm, {
743
+ submitOnEnter: true,
743
744
  form: form,
744
745
  columns: formColumns,
745
746
  onFinish: handleSearch,
@@ -63,10 +63,9 @@ var useRules = function useRules(props) {
63
63
  return Promise.resolve();
64
64
  }
65
65
  };
66
- if (type === 'Group' && Array.isArray(names) && !required) {
67
- customRequired = null;
66
+ if (!(type === 'Group' && Array.isArray(names) && !required)) {
67
+ internalRule.rules.push(customRequired);
68
68
  }
69
- internalRule.rules.push(customRequired);
70
69
  }
71
70
  }, [internalRule]);
72
71
  return internalRule;
@@ -175,10 +175,13 @@ var useShouldUpdate = function useShouldUpdate(props) {
175
175
  clearInterval(timerRef.current);
176
176
  }
177
177
  }
178
- // 当校验规则改变的时候 重新执行校验
179
- if (_required !== requiredRef.current || !(0, _lodash.isEqualWith)(rulesRef.current, _rules, _index.customEqualForFun)) {
180
- form.validateFields([name]);
181
- }
178
+ // // 当校验规则改变的时候 重新执行校验 导致: 第一次进页面直接触发校验
179
+ // if (
180
+ // _required !== requiredRef.current ||
181
+ // !isEqualWith(rulesRef.current, _rules, customEqualForFun)
182
+ // ) {
183
+ // form.validateFields([name]);
184
+ // }
182
185
  if (_show !== showRef.current || _disabled !== disabledRef.current || _required !== requiredRef.current || !(0, _lodash.isEqualWith)(rulesRef.current, _rules, _index.customEqualForFun) || !(0, _lodash.isEqualWith)(fieldPropsRef.current, _fieldProps, _index.customEqualForFun) || !(0, _lodash.isEqualWith)(originComponentRef.current, _component, _index.customEqualForFun) || (0, _index.equalDependencies)(dependencies, prevValues, _currentValues)) {
183
186
  showRef.current = _show;
184
187
  disabledRef.current = _disabled;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.3.3-beta.7",
3
+ "version": "3.3.3-beta.8",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",