Skip to content

Commit 6c63650

Browse files
committed
chore: fix deprecated access of SearchFilter global
1 parent 3e904dc commit 6c63650

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/module/apps/quench-results.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class QuenchResults extends HandlebarsApplicationMixin(ApplicationV2)<Que
4747
/**
4848
* The application's search filter, instantiated once when the app is created.
4949
*/
50-
// @ts-expect-error SearchFilter global access is deprecated, not in types yet though
50+
// @ts-expect-error SearchFilter types have not been updated yet
5151
#searchFilter = new foundry.applications.ux.SearchFilter({
5252
inputSelector: "input#quench-filter",
5353
contentSelector: "#quench-batches-list",
@@ -261,7 +261,10 @@ export class QuenchResults extends HandlebarsApplicationMixin(ApplicationV2)<Que
261261
const checkElement = (element: HTMLElement, parentHasQuery = false): boolean => {
262262
// Whether the element itself matches the query
263263
const hasQuery = rgx.test(
264-
SearchFilter.cleanQuery(element.querySelector(".runnable-title")?.textContent || ""),
264+
// @ts-expect-error SearchFilter types have not been updated yet
265+
foundry.applications.ux.SearchFilter.cleanQuery(
266+
element.querySelector(".runnable-title")?.textContent || "",
267+
),
265268
);
266269
const runnables = [...(element.querySelector(".runnable-list")?.children ?? [])];
267270
// Whether any of the element's children match the query
@@ -303,7 +306,8 @@ export class QuenchResults extends HandlebarsApplicationMixin(ApplicationV2)<Que
303306
for (const batchLi of html?.children ?? []) {
304307
const batchLabel = batchLi.querySelector(".test-batch > label")?.textContent;
305308
const batchMatchesQuery = batchLabel
306-
? rgx.test(SearchFilter.cleanQuery(batchLabel))
309+
? // @ts-expect-error SearchFilter types have not been updated yet
310+
rgx.test(foundry.applications.ux.SearchFilter.cleanQuery(batchLabel))
307311
: undefined;
308312
let batchHasQuery = batchMatchesQuery || false;
309313
for (const element of batchLi.querySelector(".runnable-list")?.children ?? []) {

0 commit comments

Comments
 (0)