From 6b5134f0c962337300c8739995704b640e411f11 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 16 May 2023 15:12:23 +0200 Subject: [PATCH] Fix typescript issue --- ts/WoltLabSuite/Core/Ui/Search/Extended.ts | 4 ++-- .../files/js/WoltLabSuite/Core/Ui/Search/Extended.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ts/WoltLabSuite/Core/Ui/Search/Extended.ts b/ts/WoltLabSuite/Core/Ui/Search/Extended.ts index c66b8a9c09..13a3cf6b7a 100644 --- a/ts/WoltLabSuite/Core/Ui/Search/Extended.ts +++ b/ts/WoltLabSuite/Core/Ui/Search/Extended.ts @@ -42,7 +42,7 @@ export class UiSearchExtended { private readonly queryInput: HTMLInputElement; private readonly typeInput: HTMLSelectElement; private readonly delimiter: HTMLDivElement; - private readonly filtersContainer: HTMLElement; + private readonly filtersContainer: HTMLDetailsElement; private searchID: number | undefined = undefined; private pages = 0; private activePage = 1; @@ -54,7 +54,7 @@ export class UiSearchExtended { this.form = document.getElementById("extendedSearchForm") as HTMLFormElement; this.queryInput = document.getElementById("searchQuery") as HTMLInputElement; this.typeInput = document.getElementById("searchType") as HTMLSelectElement; - this.filtersContainer = document.querySelector(".searchFiltersContainer") as HTMLElement; + this.filtersContainer = document.querySelector(".searchFiltersContainer") as HTMLDetailsElement; this.delimiter = document.createElement("div"); this.form.insertAdjacentElement("afterend", this.delimiter); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Extended.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Extended.js index 31c02e7b64..c134a49245 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Extended.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Search/Extended.js @@ -101,9 +101,9 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Date/Picker", "../.. this.showSearchResults(template); } else if (Object.keys(this.getFormData()).length > 4) { - // If no results are found and advanced filters are active, - // make sure that the corresponding area is shown, - this.filtersContainer.setAttribute("open", ""); + // Show the advanced filters when there are no results + // but advanced filters are applied. + this.filtersContainer.open = true; } } updateQueryString(searchAction) { -- 2.20.1