@lemon-fe/components 1.4.17-alpha.1 → 1.4.17-alpha.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.
@@ -189,6 +189,9 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
189
189
  setState(defaultState);
190
190
  },
191
191
  updateNode: function updateNode(node) {
192
+ if (!state.keywords.trim().length) {
193
+ return;
194
+ }
192
195
  var id = node.id;
193
196
  var rowIndex = node.rowIndex;
194
197
  if (id === undefined || rowIndex === null) {
@@ -240,7 +243,7 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
240
243
  },
241
244
  update: function update(rows) {
242
245
  // 如果预估搜索时间超过100ms,则不进行搜索
243
- if (duration.current * rows > 100) {
246
+ if (!state.keywords.trim().length || duration.current * rows > 100) {
244
247
  return;
245
248
  }
246
249
  handleSearch(state.keywords, state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.4.17-alpha.1",
3
+ "version": "1.4.17-alpha.2",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "dde1bbf2ccb15cbde7734f528a685f968f91dcf9"
61
+ "gitHead": "a88348d41f402297b2a4db7acf5b3b13c73705f1"
62
62
  }