@gingkoo/pandora-explorer 0.1.4 → 0.1.5

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/lib/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-explorer v0.1.4
2
+ * @gingkoo/pandora-explorer v0.1.5
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -8790,7 +8790,7 @@ const Layout$1 = props => {
8790
8790
  function searchNode(node, searchText, pathKeys = []) {
8791
8791
  // 检查当前节点是否匹配
8792
8792
  const currentPath = [...pathKeys, node.key];
8793
- const isMatched = node.name.toLowerCase().includes(searchText);
8793
+ const isMatched = node.title?.toLowerCase().includes(searchText) || false;
8794
8794
  // 如果有子节点,递归检查子节点
8795
8795
  let matchedChildren = [];
8796
8796
  let childExpandedKeys = [];
@@ -8820,7 +8820,7 @@ const Layout$1 = props => {
8820
8820
  keys: []
8821
8821
  };
8822
8822
  }
8823
- const result = searchTree(store.curlist, store.searchFiles);
8823
+ const result = searchTree(store.curlist, store?.searchFiles);
8824
8824
  store.setExpandkey(result.expandedKeys);
8825
8825
  return result.tree;
8826
8826
  }, [store.curlist, store?.searchFiles]);