diff --git a/src/components/SchemaSearch.tsx b/src/components/SchemaSearch.tsx index e3731cf..c518d69 100644 --- a/src/components/SchemaSearch.tsx +++ b/src/components/SchemaSearch.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import { Autocomplete, Button } from "@mantine/core"; +import { Autocomplete } from "@mantine/core"; import "@/css/SchemaSearch.css"; interface SchemaSearch { @@ -9,12 +9,13 @@ interface SchemaSearch { const SchemaSearch: React.FC = ({ schemas, clear }) => { const [value, setValue] = useState(""); - const [selectedSchema, setSelected] = useState([]); + //const [selectedSchema, setSelected] = useState([]); const filteredSchemas = schemas.filter((schema) => schema.toLowerCase().includes(value.toLowerCase()), ); - + { + /* const addSchema = (newSchema: string) => { if (!selectedSchema.includes(newSchema)) { setSelected([...selectedSchema, newSchema]); @@ -22,16 +23,18 @@ const SchemaSearch: React.FC = ({ schemas, clear }) => { alert("Schema already selected!"); } }; + */ + } const clearSchema = () => { - setSelected([]); + //setSelected([]); setValue(""); }; const handleKeyDown = (event: React.KeyboardEvent) => { if (event.key === "Enter" && filteredSchemas.length > 0) { setValue(filteredSchemas[0]); - addSchema(filteredSchemas[0]); + //addSchema(filteredSchemas[0]); } }; @@ -50,6 +53,7 @@ const SchemaSearch: React.FC = ({ schemas, clear }) => { onKeyDown={handleKeyDown} />
+ {/* {selectedSchema.length > 0 && (
@@ -58,11 +62,10 @@ const SchemaSearch: React.FC = ({ schemas, clear }) => {
  • {str}
  • ))} - +
    )} + */} ); };