@hi-ui/table 4.0.0-beta.39 → 4.0.0-beta.41

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.
@@ -90,6 +90,9 @@ var useTableCheck = function useTableCheck(_ref) {
90
90
  var checkedRowKeys = targetItems.map(function (item) {
91
91
  return item.id;
92
92
  });
93
+ var targetRowItems = targetItems.map(function (item) {
94
+ return item.raw;
95
+ });
93
96
  var checkedRowKeysSet = new Set(checkedRowKeys);
94
97
 
95
98
  if (checkedAll) {
@@ -98,7 +101,7 @@ var useTableCheck = function useTableCheck(_ref) {
98
101
  return prev.filter(function (id) {
99
102
  return !checkedRowKeysSet.has(id);
100
103
  });
101
- }, targetItems, false);
104
+ }, targetRowItems, false);
102
105
  return;
103
106
  }
104
107
 
@@ -108,7 +111,7 @@ var useTableCheck = function useTableCheck(_ref) {
108
111
  return checkedRowKeysSet.add(id);
109
112
  });
110
113
  return Array.from(checkedRowKeysSet);
111
- }, targetItems, true);
114
+ }, targetRowItems, true);
112
115
  }, [trySetCheckedRowKeys, flattedData, checkRowIsDisabledCheckbox, checkedAll]);
113
116
  return {
114
117
  tryCheckAllRow: tryCheckAllRow,
@@ -87,7 +87,6 @@ var useExpand = function useExpand(flattedData, defaultExpandedIds, expandedIdsP
87
87
  trySetTransitionData(flattedData, expandedIds);
88
88
  }, [flattedData, trySetTransitionData, expandedIds]);
89
89
  var onNodeToggleStart = React.useCallback(function (expandedNode, shouldExpanded) {
90
- console.error('onNodeToggleStart---------------', expandedNode, shouldExpanded);
91
90
  if (isExpandingRef.current) return;
92
91
  var expanded = expandedIdsRef.current.indexOf(expandedNode.id) !== -1;
93
92
 
@@ -71,6 +71,9 @@ var useTableCheck = function useTableCheck(_ref) {
71
71
  var checkedRowKeys = targetItems.map(function (item) {
72
72
  return item.id;
73
73
  });
74
+ var targetRowItems = targetItems.map(function (item) {
75
+ return item.raw;
76
+ });
74
77
  var checkedRowKeysSet = new Set(checkedRowKeys);
75
78
 
76
79
  if (checkedAll) {
@@ -79,7 +82,7 @@ var useTableCheck = function useTableCheck(_ref) {
79
82
  return prev.filter(function (id) {
80
83
  return !checkedRowKeysSet.has(id);
81
84
  });
82
- }, targetItems, false);
85
+ }, targetRowItems, false);
83
86
  return;
84
87
  }
85
88
 
@@ -89,7 +92,7 @@ var useTableCheck = function useTableCheck(_ref) {
89
92
  return checkedRowKeysSet.add(id);
90
93
  });
91
94
  return Array.from(checkedRowKeysSet);
92
- }, targetItems, true);
95
+ }, targetRowItems, true);
93
96
  }, [trySetCheckedRowKeys, flattedData, checkRowIsDisabledCheckbox, checkedAll]);
94
97
  return {
95
98
  tryCheckAllRow: tryCheckAllRow,
@@ -77,7 +77,6 @@ var useExpand = function useExpand(flattedData, defaultExpandedIds, expandedIdsP
77
77
  trySetTransitionData(flattedData, expandedIds);
78
78
  }, [flattedData, trySetTransitionData, expandedIds]);
79
79
  var onNodeToggleStart = useCallback(function (expandedNode, shouldExpanded) {
80
- console.error('onNodeToggleStart---------------', expandedNode, shouldExpanded);
81
80
  if (isExpandingRef.current) return;
82
81
  var expanded = expandedIdsRef.current.indexOf(expandedNode.id) !== -1;
83
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/table",
3
- "version": "4.0.0-beta.39",
3
+ "version": "4.0.0-beta.41",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HIUI <mi-hiui@xiaomi.com>",
@@ -48,19 +48,19 @@
48
48
  "@hi-ui/classname": "^4.0.0-beta.0",
49
49
  "@hi-ui/core-css": "^4.0.0-beta.5",
50
50
  "@hi-ui/dom-utils": "^4.0.0-beta.5",
51
- "@hi-ui/drawer": "^4.0.0-beta.22",
52
- "@hi-ui/empty-state": "^4.0.0-beta.16",
51
+ "@hi-ui/drawer": "^4.0.0-beta.23",
52
+ "@hi-ui/empty-state": "^4.0.0-beta.17",
53
53
  "@hi-ui/env": "^4.0.0-beta.0",
54
- "@hi-ui/func-utils": "^4.0.0-beta.10",
54
+ "@hi-ui/func-utils": "^4.0.0-beta.11",
55
55
  "@hi-ui/icon-button": "^4.0.0-beta.8",
56
56
  "@hi-ui/icons": "^4.0.0-beta.10",
57
- "@hi-ui/loading": "^4.0.0-beta.15",
58
- "@hi-ui/locale-context": "^4.0.0-beta.16",
59
- "@hi-ui/object-utils": "^4.0.0-beta.9",
60
- "@hi-ui/pagination": "^4.0.0-beta.24",
57
+ "@hi-ui/loading": "^4.0.0-beta.16",
58
+ "@hi-ui/locale-context": "^4.0.0-beta.17",
59
+ "@hi-ui/object-utils": "^4.0.0-beta.10",
60
+ "@hi-ui/pagination": "^4.0.0-beta.25",
61
61
  "@hi-ui/popper": "^4.0.0-beta.12",
62
62
  "@hi-ui/react-utils": "^4.0.0-beta.5",
63
- "@hi-ui/select": "^4.0.0-beta.22",
63
+ "@hi-ui/select": "^4.0.0-beta.23",
64
64
  "@hi-ui/spinner": "^4.0.0-beta.8",
65
65
  "@hi-ui/times": "^4.0.0-beta.5",
66
66
  "@hi-ui/tree-utils": "^4.0.0-beta.4",
@@ -86,5 +86,5 @@
86
86
  "react": "^17.0.1",
87
87
  "react-dom": "^17.0.1"
88
88
  },
89
- "gitHead": "322d9175c9135e3fd6ea2971c2781bac2f7300eb"
89
+ "gitHead": "4e6a2fe464fac98636d964dcd1b5a482ebb44125"
90
90
  }