@hi-ui/check-cascader 4.2.4 → 4.2.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @hi-ui/check-cascader
2
2
 
3
+ ## 4.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2752](https://github.com/XiaoMi/hiui/pull/2752) [`8cc7d032a`](https://github.com/XiaoMi/hiui/commit/8cc7d032aff1aa62099e71e2e1a3ca3a9a226e30) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复 PARENT 和 CHILD 模式在搜索场景下 id 丢失问题
8
+
9
+ - Updated dependencies [[`a9b9c93fc`](https://github.com/XiaoMi/hiui/commit/a9b9c93fc3a3fea60d14052a5afeef9daf7efa1b), [`b3a13135c`](https://github.com/XiaoMi/hiui/commit/b3a13135c77e75291d5864ff7fcf63ddb2ff46b8), [`ca008e4ae`](https://github.com/XiaoMi/hiui/commit/ca008e4ae9753bc1f11efcdcbf09121d1ef07b56)]:
10
+ - @hi-ui/input@4.1.0
11
+ - @hi-ui/tag-input@4.1.0
12
+ - @hi-ui/tree-utils@4.1.6
13
+
14
+ ## 4.2.5
15
+
16
+ ### Patch Changes
17
+
18
+ - build: rollup2 构建
19
+ - Updated dependencies
20
+ - @hi-ui/core@4.0.8
21
+ - @hi-ui/use-check@4.0.5
22
+ - @hi-ui/use-data-source@4.0.4
23
+ - @hi-ui/use-latest@4.0.4
24
+ - @hi-ui/use-merge-refs@4.0.4
25
+ - @hi-ui/use-outside-click@4.0.4
26
+ - @hi-ui/use-search-mode@4.1.4
27
+ - @hi-ui/use-toggle@4.0.4
28
+ - @hi-ui/use-uncontrolled-state@4.0.4
29
+ - @hi-ui/icons@4.0.18
30
+ - @hi-ui/checkbox@4.0.8
31
+ - @hi-ui/input@4.0.13
32
+ - @hi-ui/picker@4.1.4
33
+ - @hi-ui/popper@4.1.3
34
+ - @hi-ui/spinner@4.0.8
35
+ - @hi-ui/tag-input@4.0.10
36
+ - @hi-ui/array-utils@4.0.4
37
+ - @hi-ui/classname@4.0.4
38
+ - @hi-ui/env@4.0.4
39
+ - @hi-ui/func-utils@4.0.4
40
+ - @hi-ui/times@4.0.4
41
+ - @hi-ui/tree-utils@4.1.4
42
+ - @hi-ui/type-assertion@4.0.4
43
+
3
44
  ## 4.2.4
4
45
 
5
46
  ### Patch Changes
@@ -31,12 +31,14 @@ var useCheck = function useCheck(checkedMode, disabled, flattedData, defaultChec
31
31
  trySetCheckedIds = _useUncontrolledState[1];
32
32
  // 入口数据处理
33
33
  var parsedCheckedIds = index.parseCheckDataDirty(checkedMode, checkedIds, flattedData, allowCheck);
34
+ // 合并 checkedIds,防止部分模式(PARENT和CHILD)在搜索场景下 id 丢失 (https://github.com/XiaoMi/hiui/issues/2750)
35
+ var mergedCheckedIds = Array.from(new Set([].concat(parsedCheckedIds, checkedIds)));
34
36
  var cascaded = checkedMode !== 'SEPARATE';
35
37
  return useCheck$1.useCascadeCheck({
36
38
  cascaded: cascaded,
37
39
  disabled: disabled,
38
40
  flattedData: flattedData,
39
- checkedIds: parsedCheckedIds,
41
+ checkedIds: mergedCheckedIds,
40
42
  onCheck: function onCheck(checkedIds, checkedNode, shouldChecked, semiCheckedIds) {
41
43
  // 出口数据处理
42
44
  var processedIds = index.processCheckedIds(checkedMode, checkedIds, flattedData, allowCheck);
@@ -26,12 +26,14 @@ var useCheck = function useCheck(checkedMode, disabled, flattedData, defaultChec
26
26
  trySetCheckedIds = _useUncontrolledState[1];
27
27
  // 入口数据处理
28
28
  var parsedCheckedIds = parseCheckDataDirty(checkedMode, checkedIds, flattedData, allowCheck);
29
+ // 合并 checkedIds,防止部分模式(PARENT和CHILD)在搜索场景下 id 丢失 (https://github.com/XiaoMi/hiui/issues/2750)
30
+ var mergedCheckedIds = Array.from(new Set([].concat(parsedCheckedIds, checkedIds)));
29
31
  var cascaded = checkedMode !== 'SEPARATE';
30
32
  return useCascadeCheck({
31
33
  cascaded: cascaded,
32
34
  disabled: disabled,
33
35
  flattedData: flattedData,
34
- checkedIds: parsedCheckedIds,
36
+ checkedIds: mergedCheckedIds,
35
37
  onCheck: function onCheck(checkedIds, checkedNode, shouldChecked, semiCheckedIds) {
36
38
  // 出口数据处理
37
39
  var processedIds = processCheckedIds(checkedMode, checkedIds, flattedData, allowCheck);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-cascader",
3
- "version": "4.2.4",
3
+ "version": "4.2.6",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -44,37 +44,37 @@
44
44
  "url": "https://github.com/XiaoMi/hiui/issues"
45
45
  },
46
46
  "dependencies": {
47
- "@hi-ui/array-utils": "^4.0.3",
48
- "@hi-ui/checkbox": "^4.0.7",
49
- "@hi-ui/classname": "^4.0.3",
50
- "@hi-ui/env": "^4.0.3",
51
- "@hi-ui/func-utils": "^4.0.3",
52
- "@hi-ui/icons": "^4.0.17",
53
- "@hi-ui/input": "^4.0.12",
54
- "@hi-ui/picker": "^4.1.3",
55
- "@hi-ui/popper": "^4.1.2",
56
- "@hi-ui/spinner": "^4.0.7",
57
- "@hi-ui/tag-input": "^4.0.9",
58
- "@hi-ui/times": "^4.0.3",
59
- "@hi-ui/tree-utils": "^4.1.3",
60
- "@hi-ui/type-assertion": "^4.0.3",
61
- "@hi-ui/use-check": "^4.0.4",
62
- "@hi-ui/use-data-source": "^4.0.3",
63
- "@hi-ui/use-latest": "^4.0.3",
64
- "@hi-ui/use-merge-refs": "^4.0.3",
65
- "@hi-ui/use-outside-click": "^4.0.3",
66
- "@hi-ui/use-search-mode": "^4.1.3",
67
- "@hi-ui/use-toggle": "^4.0.3",
68
- "@hi-ui/use-uncontrolled-state": "^4.0.3"
47
+ "@hi-ui/array-utils": "^4.0.4",
48
+ "@hi-ui/checkbox": "^4.0.8",
49
+ "@hi-ui/classname": "^4.0.4",
50
+ "@hi-ui/env": "^4.0.4",
51
+ "@hi-ui/func-utils": "^4.0.4",
52
+ "@hi-ui/icons": "^4.0.18",
53
+ "@hi-ui/input": "^4.1.0",
54
+ "@hi-ui/picker": "^4.1.4",
55
+ "@hi-ui/popper": "^4.1.3",
56
+ "@hi-ui/spinner": "^4.0.8",
57
+ "@hi-ui/tag-input": "^4.1.0",
58
+ "@hi-ui/times": "^4.0.4",
59
+ "@hi-ui/tree-utils": "^4.1.6",
60
+ "@hi-ui/type-assertion": "^4.0.4",
61
+ "@hi-ui/use-check": "^4.0.5",
62
+ "@hi-ui/use-data-source": "^4.0.4",
63
+ "@hi-ui/use-latest": "^4.0.4",
64
+ "@hi-ui/use-merge-refs": "^4.0.4",
65
+ "@hi-ui/use-outside-click": "^4.0.4",
66
+ "@hi-ui/use-search-mode": "^4.1.4",
67
+ "@hi-ui/use-toggle": "^4.0.4",
68
+ "@hi-ui/use-uncontrolled-state": "^4.0.4"
69
69
  },
70
70
  "peerDependencies": {
71
- "@hi-ui/core": ">=4.0.7",
71
+ "@hi-ui/core": ">=4.0.8",
72
72
  "react": ">=16.8.6",
73
73
  "react-dom": ">=16.8.6"
74
74
  },
75
75
  "devDependencies": {
76
- "@hi-ui/core": "^4.0.7",
77
- "@hi-ui/core-css": "^4.1.4",
76
+ "@hi-ui/core": "^4.0.8",
77
+ "@hi-ui/core-css": "^4.1.5",
78
78
  "react": "^17.0.1",
79
79
  "react-dom": "^17.0.1"
80
80
  }