@titaui/pc 1.16.8-beta.1 → 1.16.8-beta.2
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.
|
@@ -89,7 +89,7 @@ function ImportOKRModal(props) {
|
|
|
89
89
|
onCancel && onCancel();
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
var addSelected = function
|
|
92
|
+
var addSelected = (0, _react.useCallback)(function (node) {
|
|
93
93
|
if (multiple) {
|
|
94
94
|
// const result = [...selectedRef.current, node]
|
|
95
95
|
var result = [].concat(_toConsumableArray(selected), [node]);
|
|
@@ -97,7 +97,7 @@ function ImportOKRModal(props) {
|
|
|
97
97
|
} else {
|
|
98
98
|
setSelected([node]);
|
|
99
99
|
}
|
|
100
|
-
};
|
|
100
|
+
}, []);
|
|
101
101
|
|
|
102
102
|
var removeSelected = function removeSelected(id) {
|
|
103
103
|
// const newSelected = selectedRef.current.filter((item) => item.id !== id)
|
|
@@ -170,8 +170,7 @@ var OkrTree = function OkrTree(_ref) {
|
|
|
170
170
|
|
|
171
171
|
var getTreeNodes = /*#__PURE__*/function () {
|
|
172
172
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
173
|
-
var
|
|
174
|
-
|
|
173
|
+
var data, works, total;
|
|
175
174
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
176
175
|
while (1) {
|
|
177
176
|
switch (_context.prev = _context.next) {
|
|
@@ -184,13 +183,19 @@ var OkrTree = function OkrTree(_ref) {
|
|
|
184
183
|
}, query));
|
|
185
184
|
|
|
186
185
|
case 2:
|
|
187
|
-
|
|
188
|
-
works =
|
|
189
|
-
total =
|
|
186
|
+
data = _context.sent;
|
|
187
|
+
works = [];
|
|
188
|
+
total = 0;
|
|
189
|
+
|
|
190
|
+
if (data) {
|
|
191
|
+
works = data.works;
|
|
192
|
+
total = data.total;
|
|
193
|
+
}
|
|
194
|
+
|
|
190
195
|
setWorks(works || []);
|
|
191
196
|
setTotal(total);
|
|
192
197
|
|
|
193
|
-
case
|
|
198
|
+
case 8:
|
|
194
199
|
case "end":
|
|
195
200
|
return _context.stop();
|
|
196
201
|
}
|