This commit is contained in:
Vanessa 2023-11-20 22:35:58 +08:00
parent b8eec1bd34
commit 0c04941edc
3 changed files with 3 additions and 2 deletions

View file

@ -13,6 +13,7 @@
* limitations under the License.
*/
import {setStorageVal} from "../../protyle/util/compatibility";
const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20;
/**

View file

@ -239,7 +239,7 @@ export const saveCriterion = (config: ISearchOption,
saveDialog.destroy();
});
btnsElement[1].addEventListener("click", () => {
const value = saveDialog.element.querySelector("input").value;
const value = saveDialog.element.querySelector("input").value.trim();
if (!value) {
showMessage(window.siyuan.languages["_kernel"]["142"]);
return;

View file

@ -409,7 +409,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
event.preventDefault();
break;
} else if (target.classList.contains("b3-chip__close") && type === "remove-criteria") {
const name = target.parentElement.innerText.trim();
const name = target.parentElement.innerText;
fetchPost("/api/storage/removeCriterion", {name});
criteriaData.find((item, index) => {
if (item.name === name) {