@zgfe/business-lib 1.2.71-hxd.11 → 1.2.71-hxd.12

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.
@@ -83,6 +83,10 @@ var AttrListPanel = function AttrListPanel(props) {
83
83
  _useState12 = _slicedToArray(_useState11, 2),
84
84
  eventAttrsList = _useState12[0],
85
85
  setEventAttrsList = _useState12[1];
86
+ var _useState13 = useState([]),
87
+ _useState14 = _slicedToArray(_useState13, 2),
88
+ showList = _useState14[0],
89
+ setShowList = _useState14[1];
86
90
  useEffect(function () {
87
91
  var data = {
88
92
  container: "container-".concat(id),
@@ -413,9 +417,7 @@ var AttrListPanel = function AttrListPanel(props) {
413
417
  children: eventEnvList
414
418
  });
415
419
  }
416
- if (anchorList.length == list.length) {
417
- setOptionList(list);
418
- }
420
+ setOptionList(list);
419
421
  case 40:
420
422
  case "end":
421
423
  return _context5.stop();
@@ -435,7 +437,10 @@ var AttrListPanel = function AttrListPanel(props) {
435
437
  setCurrentAttr(option);
436
438
  if (props.onChange) props.onChange(option);
437
439
  }
438
- var showList = function () {
440
+ useEffect(function () {
441
+ setShowList(onShowList());
442
+ }, [eventAttrsList]);
443
+ var onShowList = function onShowList() {
439
444
  var list = [];
440
445
  optionList.map(function (group) {
441
446
  var _group$children;
@@ -472,7 +477,7 @@ var AttrListPanel = function AttrListPanel(props) {
472
477
  }
473
478
  });
474
479
  return list;
475
- }();
480
+ };
476
481
  if (!showList.length && !searchValue) return /*#__PURE__*/React.createElement("div", {
477
482
  className: "".concat(classPrefix, "-drowdown nodata")
478
483
  }, "\u6682\u65E0\u6570\u636E");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/business-lib",
3
- "version": "1.2.71-hxd.11",
3
+ "version": "1.2.71-hxd.12",
4
4
  "module": "es/index.js",
5
5
  "typings": "es/index.d.ts",
6
6
  "files": [
@@ -55,7 +55,7 @@
55
55
  "react": "^16.12.0 || ^17.0.0",
56
56
  "yorkie": "^2.0.0"
57
57
  },
58
- "gitHead": "27bbe821d9757328f261ee3baa0fd5074de62cb5",
58
+ "gitHead": "df1df22f904cb0e2f6b685e0e7dbf61b6fd9d49f",
59
59
  "gitHooks": {
60
60
  "pre-commit": "lint-staged"
61
61
  }