diff --git a/web/ui/react-app/src/pages/targets/ScrapePoolList.tsx b/web/ui/react-app/src/pages/targets/ScrapePoolList.tsx index c9e2947e6..29585a200 100644 --- a/web/ui/react-app/src/pages/targets/ScrapePoolList.tsx +++ b/web/ui/react-app/src/pages/targets/ScrapePoolList.tsx @@ -31,6 +31,8 @@ const ScrapePoolDropDown: FC = ({ selectedPool, scrapeP const [filter, setFilter] = useState(''); + const filteredPools = scrapePools.filter((pool) => pool.toLowerCase().includes(filter.toLowerCase())); + return ( @@ -51,13 +53,11 @@ const ScrapePoolDropDown: FC = ({ selectedPool, scrapeP {scrapePools.length === 0 ? ( No scrape pools configured ) : ( - scrapePools - .filter((name) => filter === '' || name.includes(filter)) - .map((name) => ( - onScrapePoolChange(name)} active={name === selectedPool}> - {name} - - )) + filteredPools.map((name) => ( + onScrapePoolChange(name)} active={name === selectedPool}> + {name} + + )) )}