@lemon-fe/components 1.4.0-alpha.1 → 1.4.0

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.
@@ -39,6 +39,7 @@ declare class InternalDataGrid<TData extends Record<string, any>> extends Compon
39
39
  private validator;
40
40
  private requestId;
41
41
  private isReady;
42
+ private mounted;
42
43
  private readyQueue;
43
44
  private emptyRowData;
44
45
  private sideBarDef;
@@ -163,6 +163,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
163
163
  _defineProperty(_assertThisInitialized(_this), "validator", null);
164
164
  _defineProperty(_assertThisInitialized(_this), "requestId", 0);
165
165
  _defineProperty(_assertThisInitialized(_this), "isReady", false);
166
+ _defineProperty(_assertThisInitialized(_this), "mounted", false);
166
167
  _defineProperty(_assertThisInitialized(_this), "readyQueue", []);
167
168
  _defineProperty(_assertThisInitialized(_this), "emptyRowData", []);
168
169
  _defineProperty(_assertThisInitialized(_this), "sideBarDef", {
@@ -248,6 +249,12 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
248
249
  return _this.customColumnData;
249
250
  case 7:
250
251
  customColumnData = _context.sent;
252
+ if (_this.mounted) {
253
+ _context.next = 10;
254
+ break;
255
+ }
256
+ return _context.abrupt("return");
257
+ case 10:
251
258
  if (customColumnData) {
252
259
  try {
253
260
  data = customColumnData;
@@ -311,7 +318,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
311
318
  }
312
319
  });
313
320
  _this.clearReadyQueue();
314
- case 18:
321
+ case 20:
315
322
  case "end":
316
323
  return _context.stop();
317
324
  }
@@ -716,6 +723,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
716
723
  }, {
717
724
  key: "componentWillUnmount",
718
725
  value: function componentWillUnmount() {
726
+ this.mounted = false;
719
727
  this.isReady = false;
720
728
  window.removeEventListener('blur', this.handleFocus);
721
729
  }
@@ -726,15 +734,16 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
726
734
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
727
735
  while (1) switch (_context3.prev = _context3.next) {
728
736
  case 0:
737
+ this.mounted = true;
729
738
  window.addEventListener('blur', this.handleFocus);
730
739
  this.loadingChange(true, true);
731
740
 
732
741
  // 放在componentDidMount 执行时间比onGridReady早
733
- _context3.next = 4;
742
+ _context3.next = 5;
734
743
  return this.customColumnData;
735
- case 4:
736
- this.loadingChange(false, true);
737
744
  case 5:
745
+ this.loadingChange(false, true);
746
+ case 6:
738
747
  case "end":
739
748
  return _context3.stop();
740
749
  }
@@ -599,7 +599,7 @@
599
599
  }
600
600
 
601
601
  .ag-cell-label-container {
602
- font-weight: 500;
602
+ font-weight: 700;
603
603
  }
604
604
 
605
605
  .ag-header-cell-menu-button {
@@ -34,7 +34,7 @@
34
34
 
35
35
  &-title {
36
36
  flex: 1;
37
- font-weight: 500;
37
+ font-weight: 700;
38
38
  font-size: 14px;
39
39
  line-height: 22px;
40
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.4.0-alpha.1",
3
+ "version": "1.4.0",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@dnd-kit/core": ">=6.0.0",
24
- "@lemon-fe/hooks": "^1.4.0-alpha.0",
24
+ "@lemon-fe/hooks": "^1.4.0",
25
25
  "@lemon-fe/utils": "^1.3.0",
26
26
  "ag-grid-community": "29.2.0",
27
27
  "ag-grid-enterprise": "29.2.0",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "ee975709e5aefc046fa159cbc14235bad5557189"
61
+ "gitHead": "804c56e7ca26df410ba801265e29ea06deb4b715"
62
62
  }