@gmfe/table-x 2.14.0 → 2.14.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmfe/table-x",
3
- "version": "2.14.0",
3
+ "version": "2.14.1",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gmfe#readme",
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@gm-common/tool": "^1.0.0",
30
- "@gmfe/locales": "^2.14.0",
31
- "@gmfe/react": "^2.14.0",
30
+ "@gmfe/locales": "^2.14.1",
31
+ "@gmfe/react": "^2.14.1",
32
32
  "classnames": "^2.2.5",
33
33
  "lodash": "^4.17.14",
34
34
  "prop-types": "^15.7.2",
@@ -36,5 +36,5 @@
36
36
  "react-window": "^1.8.5",
37
37
  "sortablejs": "^1.10.1"
38
38
  },
39
- "gitHead": "265a37a2d09f4bf43412f667d8f6c8ec60c6e0de"
39
+ "gitHead": "76a8d0dba1fd4c1cf1ad2742bdc660c919164700"
40
40
  }
@@ -1,4 +1,4 @@
1
- import React, { useState, useMemo, useRef } from 'react'
1
+ import React, { useState, useMemo, useRef, useEffect } from 'react'
2
2
  import { getLocale } from '@gmfe/locales'
3
3
  import _ from 'lodash'
4
4
  import PropTypes from 'prop-types'
@@ -106,6 +106,10 @@ function diyTableXHOC(Component) {
106
106
  () => generateDiyColumns(columns, Storage.get(id) || [])[1]
107
107
  )
108
108
 
109
+ useEffect(() => {
110
+ setDiyCols(generateDiyColumns(columns, Storage.get(id) || [])[1])
111
+ }, [columns])
112
+
109
113
  const popoverRef = useRef()
110
114
 
111
115
  const handleDiyColumnsSave = cols => {