wargerm 0.5.11 → 0.5.12

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/index.esm.js CHANGED
@@ -10851,7 +10851,7 @@ function DragBox(_ref) {
10851
10851
  }, children)) : /*#__PURE__*/React.createElement(React.Fragment, null);
10852
10852
  }
10853
10853
 
10854
- var _excluded$h = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel"];
10854
+ var _excluded$h = ["columns", "extraColumns", "search", "visible", "setVisible", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel"];
10855
10855
 
10856
10856
  var ModalForm = function ModalForm(props, ref) {
10857
10857
  var columns = props.columns,
@@ -10859,6 +10859,7 @@ var ModalForm = function ModalForm(props, ref) {
10859
10859
  search = props.search,
10860
10860
  visible = props.visible,
10861
10861
  setVisible = props.setVisible,
10862
+ modalFormOpend = props.modalFormOpend,
10862
10863
  disabled = props.disabled,
10863
10864
  submitMethod = props.submitMethod,
10864
10865
  onSubmitSuccess = props.onSubmitSuccess,
@@ -10903,7 +10904,8 @@ var ModalForm = function ModalForm(props, ref) {
10903
10904
  useImperativeHandle(ref, function () {
10904
10905
  return {
10905
10906
  formRef: formRef.current,
10906
- onSubmit: onSubmit
10907
+ onSubmit: onSubmit,
10908
+ modalFormvisible: visible
10907
10909
  };
10908
10910
  });
10909
10911
 
@@ -10974,6 +10976,7 @@ var ModalForm = function ModalForm(props, ref) {
10974
10976
  if (visible) {
10975
10977
  resetFields();
10976
10978
  setFieldsValue(record);
10979
+ modalFormOpend && modalFormOpend(record);
10977
10980
  }
10978
10981
  }, [visible, record]);
10979
10982
  return /*#__PURE__*/React.createElement(_Modal, _objectSpread2(_objectSpread2({
@@ -11389,6 +11392,7 @@ var TabelCard = function TabelCard(props, ref) {
11389
11392
  setFormSearch(obj);
11390
11393
  }
11391
11394
  }, [columns]);
11395
+ var modalFormColumn = deepCopy(columns) || [];
11392
11396
  var formSearchColumn = columns || [];
11393
11397
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ModalForm$1, _objectSpread2(_objectSpread2({
11394
11398
  ref: modalFormRef,
@@ -11430,7 +11434,7 @@ var TabelCard = function TabelCard(props, ref) {
11430
11434
  }, modalConfig), {}, {
11431
11435
  onFormChange: onFormChange,
11432
11436
  extraColumns: extraColumns || [],
11433
- columns: (columns || []).filter(function (item) {
11437
+ columns: (modalFormColumn || []).filter(function (item) {
11434
11438
  if (item.hiddenInModalForm) {
11435
11439
  return false;
11436
11440
  }
package/dist/index.js CHANGED
@@ -10911,7 +10911,7 @@ function DragBox(_ref) {
10911
10911
  }, children)) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
10912
10912
  }
10913
10913
 
10914
- var _excluded$h = ["columns", "extraColumns", "search", "visible", "setVisible", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel"];
10914
+ var _excluded$h = ["columns", "extraColumns", "search", "visible", "setVisible", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel"];
10915
10915
 
10916
10916
  var ModalForm = function ModalForm(props, ref) {
10917
10917
  var columns = props.columns,
@@ -10919,6 +10919,7 @@ var ModalForm = function ModalForm(props, ref) {
10919
10919
  search = props.search,
10920
10920
  visible = props.visible,
10921
10921
  setVisible = props.setVisible,
10922
+ modalFormOpend = props.modalFormOpend,
10922
10923
  disabled = props.disabled,
10923
10924
  submitMethod = props.submitMethod,
10924
10925
  onSubmitSuccess = props.onSubmitSuccess,
@@ -10963,7 +10964,8 @@ var ModalForm = function ModalForm(props, ref) {
10963
10964
  React.useImperativeHandle(ref, function () {
10964
10965
  return {
10965
10966
  formRef: formRef.current,
10966
- onSubmit: onSubmit
10967
+ onSubmit: onSubmit,
10968
+ modalFormvisible: visible
10967
10969
  };
10968
10970
  });
10969
10971
 
@@ -11034,6 +11036,7 @@ var ModalForm = function ModalForm(props, ref) {
11034
11036
  if (visible) {
11035
11037
  resetFields();
11036
11038
  setFieldsValue(record);
11039
+ modalFormOpend && modalFormOpend(record);
11037
11040
  }
11038
11041
  }, [visible, record]);
11039
11042
  return /*#__PURE__*/React__default['default'].createElement(_Modal__default['default'], _objectSpread2(_objectSpread2({
@@ -11449,6 +11452,7 @@ var TabelCard = function TabelCard(props, ref) {
11449
11452
  setFormSearch(obj);
11450
11453
  }
11451
11454
  }, [columns]);
11455
+ var modalFormColumn = deepCopy(columns) || [];
11452
11456
  var formSearchColumn = columns || [];
11453
11457
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ModalForm$1, _objectSpread2(_objectSpread2({
11454
11458
  ref: modalFormRef,
@@ -11490,7 +11494,7 @@ var TabelCard = function TabelCard(props, ref) {
11490
11494
  }, modalConfig), {}, {
11491
11495
  onFormChange: onFormChange,
11492
11496
  extraColumns: extraColumns || [],
11493
- columns: (columns || []).filter(function (item) {
11497
+ columns: (modalFormColumn || []).filter(function (item) {
11494
11498
  if (item.hiddenInModalForm) {
11495
11499
  return false;
11496
11500
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.5.11",
4
+ "version": "0.5.12",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",