Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 搜索条件删空以后应该隐藏

Vanessaa71b43fb872d
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index c16b1ed77c..7064e1c098 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -709,7 +709,11 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:
fetchPost("/api/storage/removeCriterion", {name: item.name.trim()});
event.preventDefault();
event.stopPropagation();
- menuElement.remove();
+ if (!menuElement.previousElementSibling && !menuElement.nextElementSibling) {
+ menuElement.parentElement.parentElement.remove();
+ } else {
+ menuElement.remove();
+ }
return;
}
if (config.layout !== item.layout) {