diff --git a/app/components/debug-search.tsx b/app/components/debug-search.tsx index 4f008b769f..374ab6a654 100644 --- a/app/components/debug-search.tsx +++ b/app/components/debug-search.tsx @@ -8,9 +8,14 @@ import CircularProgress from "@mui/material/CircularProgress"; import MenuItem from "@mui/material/MenuItem"; import Select from "@mui/material/Select"; import Switch from "@mui/material/Switch"; +import TextField from "@mui/material/TextField"; import Typography from "@mui/material/Typography"; -import React, { useRef, useState } from "react"; -import { useEffect } from "react"; +import React, { + useRef, + useState, + useEffect, + KeyboardEventHandler, +} from "react"; import { DataCubeSearchFilter, useDataCubesQuery } from "@/graphql/query-hooks"; @@ -181,6 +186,17 @@ const DebugSearch = () => { const [sourceUrl, setSourceUrl] = useState( "https://int.lindas.admin.ch/query" ); + + const [customSearch, setCustomSearch] = useState(""); + const handleKeyUp: KeyboardEventHandler = (ev) => { + if (ev.key === "Enter") { + if (!ev.target) { + return; + } + setCustomSearch((ev.target as HTMLInputElement).value); + } + }; + return ( { int prod - - - - - - - - - - - - - - - + {customSearch !== "" ? ( + + ) : ( + <> + + + + + + + + + + + + + + + + )} ); };