diff --git a/conformance-search/src/components/Input/Input.tsx b/conformance-search/src/components/Input/Input.tsx index c2556e76..340295cf 100644 --- a/conformance-search/src/components/Input/Input.tsx +++ b/conformance-search/src/components/Input/Input.tsx @@ -23,8 +23,8 @@ export default function Input({ return ( ) => updateFilter(index, (e.target as HTMLInputElement).value) } diff --git a/conformance-search/src/components/Input/variants/ContainerInput.tsx b/conformance-search/src/components/Input/variants/ContainerInput.tsx index 572b1b40..9b1a5b99 100644 --- a/conformance-search/src/components/Input/variants/ContainerInput.tsx +++ b/conformance-search/src/components/Input/variants/ContainerInput.tsx @@ -99,7 +99,7 @@ export default function ContainerInput({ // Focus the input when the parsed value changes const inputRef = useRef(null); useEffect(() => { - inputRef.current?.focus(); + if (parsed.length > 0) inputRef.current?.focus(); }, [parsed]); // Dropdown menu @@ -177,7 +177,7 @@ export default function ContainerInput({ autoCapitalize="off" autoComplete="off" autoCorrect="off" - className="w-fit focus:outline-none xs:w-full" + className="w-fit bg-transparent focus:outline-none xs:w-full" onChange={(e: React.ChangeEvent) => { setQuery((e.target as HTMLInputElement).value); setOpen(true); diff --git a/conformance-search/src/components/SearchComponent/SearchComponent.tsx b/conformance-search/src/components/SearchComponent/SearchComponent.tsx index 2fcfd0d7..e396f380 100644 --- a/conformance-search/src/components/SearchComponent/SearchComponent.tsx +++ b/conformance-search/src/components/SearchComponent/SearchComponent.tsx @@ -86,7 +86,7 @@ export default function SearchComponent({ autoCapitalize="off" autoComplete="off" autoCorrect="off" - className="h-16 min-w-0 grow rounded-md px-5 text-sm focus:outline-none disabled:bg-transparent" + className="h-16 min-w-0 grow rounded-tl-md bg-transparent px-5 text-lg only:rounded-t-md focus:outline-none disabled:bg-gray-100" disabled={!ready} onChange={(e: React.ChangeEvent) => { setQuery((e.target as HTMLInputElement).value); @@ -97,23 +97,20 @@ export default function SearchComponent({ type="text" value={query} /> - + {ready && !loading && (query || filters.length > 0) && ( + + )} + {(!ready || loading) && (
diff --git a/conformance-search/src/pages/CoveragePage/CoveragePage.tsx b/conformance-search/src/pages/CoveragePage/CoveragePage.tsx index 93b5c1bb..3a62da1f 100644 --- a/conformance-search/src/pages/CoveragePage/CoveragePage.tsx +++ b/conformance-search/src/pages/CoveragePage/CoveragePage.tsx @@ -206,7 +206,7 @@ export default function CoveragePage() { />
) => setSearch((e.target as HTMLInputElement).value) }