From 94a938e2c75087b1f6027df907608fc50d318d4d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 30 Nov 2022 10:40:26 +0800 Subject: [PATCH] :sparkles: https://github.com/siyuan-note/siyuan/issues/6744 --- app/src/search/util.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/search/util.ts b/app/src/search/util.ts index d5c5f5239..b3ece6ed7 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -580,6 +580,10 @@ const addConfigGroupMenu = (config: ISearchOption, edit: Protyle, element: Eleme click() { element.querySelector("#searchList").parentElement.style.flexDirection = "column"; setPadding(edit.protyle); + config.layout = 0; + if (!element.parentElement.getAttribute("data-id")) { + localStorage.setItem(Constants.LOCAL_SEARCHEDATA, JSON.stringify(config)); + } } }).element); window.siyuan.menus.menu.append(new MenuItem({ @@ -588,6 +592,10 @@ const addConfigGroupMenu = (config: ISearchOption, edit: Protyle, element: Eleme click() { element.querySelector("#searchList").parentElement.style.flexDirection = "row"; setPadding(edit.protyle); + config.layout = 1; + if (!element.parentElement.getAttribute("data-id")) { + localStorage.setItem(Constants.LOCAL_SEARCHEDATA, JSON.stringify(config)); + } } }).element); };