From 64e3dd7e00a72218b072405102acf161da7ba9dc Mon Sep 17 00:00:00 2001 From: Joseph Amlung Date: Fri, 13 Mar 2026 09:05:53 -0400 Subject: [PATCH] #1681 - Enhance LocaleAutoComplete filtering to prioritize exact matches based on user input --- src/components/common/LocaleAutoComplete.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/common/LocaleAutoComplete.jsx b/src/components/common/LocaleAutoComplete.jsx index 0b5b82de..2bd5efb6 100644 --- a/src/components/common/LocaleAutoComplete.jsx +++ b/src/components/common/LocaleAutoComplete.jsx @@ -144,6 +144,13 @@ const LocaleAutoComplete = ({ cachedLocales, id, selected, multiple, required, o const defaultFilterOptions = createFilterOptions(); const filterOptions = (options, state) => { let result = defaultFilterOptions(options, state) + if(state.inputValue) { + const inputLower = state.inputValue.toLowerCase().trim() + result = [ + ...result.filter(opt => opt.id?.toLowerCase() === inputLower), + ...result.filter(opt => opt.id?.toLowerCase() !== inputLower) + ] + } if(optionsLimit) { let _limit = optionsLimit if(custom)