From de71fb9bdd746f402d2b0bcb2930dd0bb935de60 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Thu, 29 Oct 2020 09:44:27 +0800 Subject: [PATCH] Explorer: trim whitespace in search bar (#13258) --- explorer/src/components/SearchBar.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/explorer/src/components/SearchBar.tsx b/explorer/src/components/SearchBar.tsx index 3daf31de7a..fe7b0e3b37 100644 --- a/explorer/src/components/SearchBar.tsx +++ b/explorer/src/components/SearchBar.tsx @@ -164,7 +164,8 @@ function buildTokenOptions(search: string, cluster: Cluster) { } } -function buildOptions(search: string, cluster: Cluster) { +function buildOptions(rawSearch: string, cluster: Cluster) { + const search = rawSearch.trim(); if (search.length === 0) return []; const options = [];