From fe6af278133ec43724e03f08564414b474d05b06 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 7 Apr 2024 15:26:37 +0200 Subject: [PATCH 1/2] allow to search by nickname --- frontend/main.ts | 1 + templates/includes/forms/log.html.tera | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/main.ts b/frontend/main.ts index 876f650..e91cbbd 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -364,6 +364,7 @@ function initNewChoice(select: HTMLInputElement) { steering_person.setAttribute("required", "required"); } const choice = new Choices(select, { + searchFields: ['label', 'customProperties.searchableText'], removeItemButton: true, loadingText: "Wird geladen...", noResultsText: "Keine Ergebnisse gefunden", diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 8c04c08..d1d46e4 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -86,7 +86,7 @@ From b7e8e1fa379a5c6dc62abb8163347871acd85ea2 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 7 Apr 2024 15:30:52 +0200 Subject: [PATCH 2/2] keep defaults --- frontend/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/main.ts b/frontend/main.ts index e91cbbd..a7497fd 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -364,7 +364,7 @@ function initNewChoice(select: HTMLInputElement) { steering_person.setAttribute("required", "required"); } const choice = new Choices(select, { - searchFields: ['label', 'customProperties.searchableText'], + searchFields: ['label', 'value', 'customProperties.searchableText'], removeItemButton: true, loadingText: "Wird geladen...", noResultsText: "Keine Ergebnisse gefunden",