From 0c4dead847ac46372fd88e7713edcf3d0b09ae79 Mon Sep 17 00:00:00 2001 From: Simao Rodrigues Date: Mon, 7 Oct 2024 13:12:43 +0100 Subject: [PATCH] Custom filtering when using the location input search in the sidebar --- .../location-selector/location-dropdown/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/containers/map/sidebar/main-panel/location-selector/location-dropdown/index.tsx b/frontend/src/containers/map/sidebar/main-panel/location-selector/location-dropdown/index.tsx index 4f62c11e..81100298 100644 --- a/frontend/src/containers/map/sidebar/main-panel/location-selector/location-dropdown/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/location-selector/location-dropdown/index.tsx @@ -51,8 +51,13 @@ const LocationDropdown: FCWithMessages = ({ } ); + const handleFiltering = (value: string, search: string) => { + if (value.toLocaleLowerCase().includes(search.toLocaleLowerCase())) return 1; + return 0; + }; + return ( - + {t('no-result')}