fix(editor): 树组件搜索后不展开所有节点
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user