diff --git a/explorer/package-lock.json b/explorer/package-lock.json index cad52313ea..fadfd5fa09 100644 --- a/explorer/package-lock.json +++ b/explorer/package-lock.json @@ -3320,9 +3320,9 @@ } }, "@types/react-select": { - "version": "3.0.26", - "resolved": "https://registry.npmjs.org/@types/react-select/-/react-select-3.0.26.tgz", - "integrity": "sha512-rAaiD0SFkBi3PUwp1DrJV04CobPl2LuZXF+kv6MKw8kaeGo82xTOZzjM8DDi4lrdkqGbInZiE2QO9nIJm3bqgw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/react-select/-/react-select-3.1.2.tgz", + "integrity": "sha512-ygvR/2FL87R2OLObEWFootYzkvm67LRA+URYEAcBuvKk7IXmdsnIwSGm60cVXGaqkJQHozb2Cy1t94tCYb6rJA==", "requires": { "@types/react": "*", "@types/react-dom": "*", diff --git a/explorer/package.json b/explorer/package.json index f5e9c6c988..5fda990a9a 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -20,7 +20,7 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/react-router-dom": "^5.1.7", - "@types/react-select": "^3.0.26", + "@types/react-select": "^3.1.2", "@types/socket.io-client": "^1.4.34", "bn.js": "^5.1.3", "bootstrap": "^4.5.3", diff --git a/explorer/src/components/SearchBar.tsx b/explorer/src/components/SearchBar.tsx index 5e9cf4589d..a25d4a5840 100644 --- a/explorer/src/components/SearchBar.tsx +++ b/explorer/src/components/SearchBar.tsx @@ -20,7 +20,10 @@ export function SearchBar() { const location = useLocation(); const { cluster } = useCluster(); - const onChange = ({ pathname }: ValueType, meta: ActionMeta) => { + const onChange = ( + { pathname }: ValueType, + meta: ActionMeta + ) => { if (meta.action === "select-option") { history.push({ ...location, pathname }); setSearch(""); @@ -197,7 +200,7 @@ function buildOptions(rawSearch: string, cluster: Cluster) { options: [ { label: `Slot #${search}`, - value: search, + value: [search], pathname: `/block/${search}`, }, ], @@ -215,7 +218,7 @@ function buildOptions(rawSearch: string, cluster: Cluster) { options: [ { label: search, - value: search, + value: [search], pathname: "/address/" + search, }, ], @@ -226,7 +229,7 @@ function buildOptions(rawSearch: string, cluster: Cluster) { options: [ { label: search, - value: search, + value: [search], pathname: "/tx/" + search, }, ],