From 239d8fa948f1f7907fefecd76f1e2c0bd5eb6106 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Fri, 24 Nov 2023 06:23:27 -0800 Subject: [PATCH] Fix card-picker search for single character (#18733) * Fix card-picker search for single character * Update src/panels/lovelace/editor/card-editor/hui-card-picker.ts Co-authored-by: Paul Bottein --------- Co-authored-by: Bram Kragten Co-authored-by: Paul Bottein --- src/panels/lovelace/editor/card-editor/hui-card-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/lovelace/editor/card-editor/hui-card-picker.ts b/src/panels/lovelace/editor/card-editor/hui-card-picker.ts index 230f13845b..f9773c8c1b 100644 --- a/src/panels/lovelace/editor/card-editor/hui-card-picker.ts +++ b/src/panels/lovelace/editor/card-editor/hui-card-picker.ts @@ -81,7 +81,7 @@ export class HuiCardPicker extends LitElement { const options: IFuseOptions = { keys: ["type", "name", "description"], isCaseSensitive: false, - minMatchCharLength: 2, + minMatchCharLength: filter.length === 1 ? 1 : 2, threshold: 0.2, }; const fuse = new Fuse(cards, options);