fix(editor): 树组件搜索后不展开所有节点

This commit is contained in:
roymondchen 2025-07-02 19:47:52 +08:00
parent 727af1058d
commit c984c1a0cf

View File

@ -32,10 +32,12 @@ export const useFilter = (
const visible = filterIsMatch(text, node);
if (visible && parents.length) {
parents.forEach((parent) => {
updateStatus(nodeStatusMap.value!, parent.id, {
visible,
expand: true,
});
if (text || text.length) {
updateStatus(nodeStatusMap.value!, parent.id, {
visible,
expand: true,
});
}
});
}