@gmfe/react 2.14.9 → 2.14.11

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/react",
3
- "version": "2.14.9",
3
+ "version": "2.14.11",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gmfe#readme",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@gm-common/tool": "^1.0.0",
30
- "@gmfe/locales": "^2.14.9",
30
+ "@gmfe/locales": "^2.14.11",
31
31
  "big.js": "^5.2.2",
32
32
  "classnames": "^2.2.5",
33
33
  "lodash": "^4.17.14",
@@ -35,5 +35,5 @@
35
35
  "prop-types": "^15.7.2",
36
36
  "react-window": "^1.8.5"
37
37
  },
38
- "gitHead": "06f4dff55617ae57f476cf3ca08c1b94294a9f51"
38
+ "gitHead": "2415091911db68597c5411e9c7657d88bdd8aad8"
39
39
  }
@@ -433,8 +433,15 @@ class Base extends React.Component {
433
433
 
434
434
  function renderListFilterDefault(data, query) {
435
435
  const result = []
436
+ const keywords = query.toLowerCase()
437
+ // TODO 加个queryText,用于基于多个搜索结果的情况下,因为是公共组件,所以多加个字段
436
438
  _.each(data, v => {
437
- const arr = _.filter(v.children, item => item.text.includes(query))
439
+ const arr = _.filter(
440
+ v?.children || [],
441
+ item =>
442
+ item?.text?.toLowerCase()?.includes(keywords) ||
443
+ item?.queryText?.toLowerCase()?.includes(keywords)
444
+ )
438
445
  if (arr.length) {
439
446
  result.push({
440
447
  ...v,
@@ -83,7 +83,11 @@ function getLeafValues(list) {
83
83
  () => true
84
84
  )
85
85
 
86
- return _.map(flat, item => item.data.value)
86
+ // 这里再加一个过滤禁用的
87
+ return _.map(
88
+ flat.filter(item => !item?.data?.disabled),
89
+ item => item.data.value
90
+ )
87
91
  }
88
92
 
89
93
  // 用find,高效。深度遍历,找到存在没选的就终止遍历。