kts-component-invoice-operate 3.2.95 → 3.2.96
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/dist/index.esm.js
CHANGED
|
@@ -10831,6 +10831,7 @@ function ItemNameInput(props) {
|
|
|
10831
10831
|
}, []);
|
|
10832
10832
|
var onSearch = React.useCallback( /*#__PURE__*/function () {
|
|
10833
10833
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
|
|
10834
|
+
var list;
|
|
10834
10835
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10835
10836
|
while (1) {
|
|
10836
10837
|
switch (_context.prev = _context.next) {
|
|
@@ -10838,34 +10839,36 @@ function ItemNameInput(props) {
|
|
|
10838
10839
|
_context.prev = 0;
|
|
10839
10840
|
|
|
10840
10841
|
if (!autoComplete.onItemNameSearch) {
|
|
10841
|
-
_context.next =
|
|
10842
|
+
_context.next = 9;
|
|
10842
10843
|
break;
|
|
10843
10844
|
}
|
|
10844
10845
|
|
|
10845
|
-
_context.t0 =
|
|
10846
|
+
_context.t0 = _toConsumableArray;
|
|
10846
10847
|
_context.next = 5;
|
|
10847
10848
|
return autoComplete.onItemNameSearch(searchText);
|
|
10848
10849
|
|
|
10849
10850
|
case 5:
|
|
10850
10851
|
_context.t1 = _context.sent;
|
|
10851
|
-
(0, _context.t0)(_context.t1);
|
|
10852
|
+
list = (0, _context.t0)(_context.t1);
|
|
10853
|
+
console.log('===> list', list);
|
|
10854
|
+
setOptions(list);
|
|
10852
10855
|
|
|
10853
|
-
case
|
|
10854
|
-
_context.next =
|
|
10856
|
+
case 9:
|
|
10857
|
+
_context.next = 15;
|
|
10855
10858
|
break;
|
|
10856
10859
|
|
|
10857
|
-
case
|
|
10858
|
-
_context.prev =
|
|
10860
|
+
case 11:
|
|
10861
|
+
_context.prev = 11;
|
|
10859
10862
|
_context.t2 = _context["catch"](0);
|
|
10860
10863
|
setOptions([]);
|
|
10861
10864
|
throw _context.t2;
|
|
10862
10865
|
|
|
10863
|
-
case
|
|
10866
|
+
case 15:
|
|
10864
10867
|
case "end":
|
|
10865
10868
|
return _context.stop();
|
|
10866
10869
|
}
|
|
10867
10870
|
}
|
|
10868
|
-
}, _callee, null, [[0,
|
|
10871
|
+
}, _callee, null, [[0, 11]]);
|
|
10869
10872
|
}));
|
|
10870
10873
|
|
|
10871
10874
|
return function (_x) {
|
|
@@ -10912,6 +10915,7 @@ function ItemNameInput(props) {
|
|
|
10912
10915
|
return _ref2.apply(this, arguments);
|
|
10913
10916
|
};
|
|
10914
10917
|
}(), [options, controller]);
|
|
10918
|
+
console.log('===> options', options);
|
|
10915
10919
|
return React.createElement("div", {
|
|
10916
10920
|
className: 'kts-invoice-operate-goods-list-itemName-input'
|
|
10917
10921
|
}, props.shorthand && React.createElement("span", {
|
package/dist/index.js
CHANGED
|
@@ -10841,6 +10841,7 @@ function ItemNameInput(props) {
|
|
|
10841
10841
|
}, []);
|
|
10842
10842
|
var onSearch = React__default['default'].useCallback( /*#__PURE__*/function () {
|
|
10843
10843
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
|
|
10844
|
+
var list;
|
|
10844
10845
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10845
10846
|
while (1) {
|
|
10846
10847
|
switch (_context.prev = _context.next) {
|
|
@@ -10848,34 +10849,36 @@ function ItemNameInput(props) {
|
|
|
10848
10849
|
_context.prev = 0;
|
|
10849
10850
|
|
|
10850
10851
|
if (!autoComplete.onItemNameSearch) {
|
|
10851
|
-
_context.next =
|
|
10852
|
+
_context.next = 9;
|
|
10852
10853
|
break;
|
|
10853
10854
|
}
|
|
10854
10855
|
|
|
10855
|
-
_context.t0 =
|
|
10856
|
+
_context.t0 = _toConsumableArray;
|
|
10856
10857
|
_context.next = 5;
|
|
10857
10858
|
return autoComplete.onItemNameSearch(searchText);
|
|
10858
10859
|
|
|
10859
10860
|
case 5:
|
|
10860
10861
|
_context.t1 = _context.sent;
|
|
10861
|
-
(0, _context.t0)(_context.t1);
|
|
10862
|
+
list = (0, _context.t0)(_context.t1);
|
|
10863
|
+
console.log('===> list', list);
|
|
10864
|
+
setOptions(list);
|
|
10862
10865
|
|
|
10863
|
-
case
|
|
10864
|
-
_context.next =
|
|
10866
|
+
case 9:
|
|
10867
|
+
_context.next = 15;
|
|
10865
10868
|
break;
|
|
10866
10869
|
|
|
10867
|
-
case
|
|
10868
|
-
_context.prev =
|
|
10870
|
+
case 11:
|
|
10871
|
+
_context.prev = 11;
|
|
10869
10872
|
_context.t2 = _context["catch"](0);
|
|
10870
10873
|
setOptions([]);
|
|
10871
10874
|
throw _context.t2;
|
|
10872
10875
|
|
|
10873
|
-
case
|
|
10876
|
+
case 15:
|
|
10874
10877
|
case "end":
|
|
10875
10878
|
return _context.stop();
|
|
10876
10879
|
}
|
|
10877
10880
|
}
|
|
10878
|
-
}, _callee, null, [[0,
|
|
10881
|
+
}, _callee, null, [[0, 11]]);
|
|
10879
10882
|
}));
|
|
10880
10883
|
|
|
10881
10884
|
return function (_x) {
|
|
@@ -10922,6 +10925,7 @@ function ItemNameInput(props) {
|
|
|
10922
10925
|
return _ref2.apply(this, arguments);
|
|
10923
10926
|
};
|
|
10924
10927
|
}(), [options, controller]);
|
|
10928
|
+
console.log('===> options', options);
|
|
10925
10929
|
return React__default['default'].createElement("div", {
|
|
10926
10930
|
className: 'kts-invoice-operate-goods-list-itemName-input'
|
|
10927
10931
|
}, props.shorthand && React__default['default'].createElement("span", {
|
package/package.json
CHANGED
|
@@ -24,7 +24,9 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
24
24
|
const onSearch = React.useCallback(async (searchText: string) => {
|
|
25
25
|
try {
|
|
26
26
|
if (autoComplete.onItemNameSearch) {
|
|
27
|
-
|
|
27
|
+
const list = [...await autoComplete.onItemNameSearch(searchText)];
|
|
28
|
+
console.log('===> list', list);
|
|
29
|
+
setOptions(list);
|
|
28
30
|
}
|
|
29
31
|
} catch (error) {
|
|
30
32
|
setOptions([])
|
|
@@ -39,10 +41,12 @@ export default function ItemNameInput(props: { onChange?: (e: ChangeEvent<HTMLIn
|
|
|
39
41
|
await controller.setEditGood({ itemName: record.itemName });
|
|
40
42
|
|
|
41
43
|
controller.importGoodsDrawer(record);
|
|
42
|
-
|
|
44
|
+
|
|
43
45
|
setOptions([]);
|
|
44
46
|
}, [options, controller])
|
|
45
47
|
|
|
48
|
+
console.log('===> options', options)
|
|
49
|
+
|
|
46
50
|
return (
|
|
47
51
|
<div className='kts-invoice-operate-goods-list-itemName-input'>
|
|
48
52
|
{props.shorthand && <span style={{ alignSelf: 'center', fontSize: 12 }} >*{props.shorthand}*</span>}
|