@hw-component/table 1.9.36 → 1.9.37

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.
@@ -40,6 +40,15 @@ var useTableProps = function useTableProps(_ref) {
40
40
  _useState2 = _slicedToArray(_useState, 2),
41
41
  modalTableParams = _useState2[0],
42
42
  setModalTableParams = _useState2[1];
43
+ useEffect(function () {
44
+ if (configData) {
45
+ setModalTableParams(function (oldVal) {
46
+ return _objectSpread(_objectSpread({}, oldVal), {}, {
47
+ configData: configData
48
+ });
49
+ });
50
+ }
51
+ }, [configData]);
43
52
  return {
44
53
  modalTableParams: modalTableParams,
45
54
  setModalTableParams: setModalTableParams
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
@@ -41,6 +41,15 @@ var useTableProps = function useTableProps(_ref) {
41
41
  _useState2 = _slicedToArray(_useState, 2),
42
42
  modalTableParams = _useState2[0],
43
43
  setModalTableParams = _useState2[1];
44
+ React.useEffect(function () {
45
+ if (configData) {
46
+ setModalTableParams(function (oldVal) {
47
+ return _objectSpread(_objectSpread({}, oldVal), {}, {
48
+ configData: configData
49
+ });
50
+ });
51
+ }
52
+ }, [configData]);
44
53
  return {
45
54
  modalTableParams: modalTableParams,
46
55
  setModalTableParams: setModalTableParams
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "1.9.36",
3
+ "version": "1.9.37",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -35,6 +35,16 @@ export const useTableProps = ({
35
35
  request,
36
36
  dataSource,
37
37
  });
38
+ useEffect(()=>{
39
+ if (configData){
40
+ setModalTableParams((oldVal)=>{
41
+ return {
42
+ ...oldVal,
43
+ configData
44
+ }
45
+ })
46
+ }
47
+ },[configData])
38
48
  return {
39
49
  modalTableParams,
40
50
  setModalTableParams,