From 244a8369f799bc98e3253bcce99353f3a386be65 Mon Sep 17 00:00:00 2001 From: Seray Ciftci Date: Mon, 30 Jun 2025 19:46:39 +0200 Subject: [PATCH 1/3] Fixes #5228 - has tag(s) filter now takes values when typing quickly and pressing Enter --- .../desktop-client/src/components/filters/FiltersMenu.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.jsx b/packages/desktop-client/src/components/filters/FiltersMenu.jsx index ac7e9082f55..2e001ded8d7 100644 --- a/packages/desktop-client/src/components/filters/FiltersMenu.jsx +++ b/packages/desktop-client/src/components/filters/FiltersMenu.jsx @@ -209,10 +209,14 @@ function ConfigureField({
{ e.preventDefault(); + + // Use the live input value to avoid race conditions with fast typing (when pressing Enter) + const liveValue = inputRef.current?.value?.trim(); + onApply({ field, op, - value, + value: liveValue, options: subfieldToOptions(field, subfield), }); }} From 77f510e44b183d1ce268990e76966bf2ff9092b7 Mon Sep 17 00:00:00 2001 From: Seray Ciftci Date: Mon, 30 Jun 2025 20:11:50 +0200 Subject: [PATCH 2/3] Added release notes --- upcoming-release-notes/5263.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 upcoming-release-notes/5263.md diff --git a/upcoming-release-notes/5263.md b/upcoming-release-notes/5263.md new file mode 100644 index 00000000000..9f9d64c5a04 --- /dev/null +++ b/upcoming-release-notes/5263.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [seabeeberry] +--- + +Fix bug where "has tag(s)" filter created empty tag when using Enter key From 81bf90ee776d6fcf545bd6c78ed1209755a09b8c Mon Sep 17 00:00:00 2001 From: Seray Ciftci Date: Mon, 30 Jun 2025 22:33:35 +0200 Subject: [PATCH 3/3] State of GenericInput now gets updated with every keystroke --- .../src/components/filters/FiltersMenu.jsx | 6 +----- .../src/components/util/GenericInput.jsx | 20 ++++++++----------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/desktop-client/src/components/filters/FiltersMenu.jsx b/packages/desktop-client/src/components/filters/FiltersMenu.jsx index 2e001ded8d7..ac7e9082f55 100644 --- a/packages/desktop-client/src/components/filters/FiltersMenu.jsx +++ b/packages/desktop-client/src/components/filters/FiltersMenu.jsx @@ -209,14 +209,10 @@ function ConfigureField({ { e.preventDefault(); - - // Use the live input value to avoid race conditions with fast typing (when pressing Enter) - const liveValue = inputRef.current?.value?.trim(); - onApply({ field, op, - value: liveValue, + value, options: subfieldToOptions(field, subfield), }); }} diff --git a/packages/desktop-client/src/components/util/GenericInput.jsx b/packages/desktop-client/src/components/util/GenericInput.jsx index ade4f13cce2..09dc2be0236 100644 --- a/packages/desktop-client/src/components/util/GenericInput.jsx +++ b/packages/desktop-client/src/components/util/GenericInput.jsx @@ -64,10 +64,9 @@ export function GenericInput({ return ( ); } @@ -190,10 +189,9 @@ export function GenericInput({ content = ( ); break; @@ -202,10 +200,9 @@ export function GenericInput({ content = ( ); break; @@ -262,10 +259,9 @@ export function GenericInput({ content = ( ); }