fix seatch
This commit is contained in:
@@ -3,7 +3,7 @@ import Fuse from "fuse.js";
|
||||
|
||||
// https://fusejs.io/api/options.html
|
||||
const options = {
|
||||
keys: ["data.title", "data.excerpt", "data.slug"],
|
||||
keys: ["data.title", "data.slug"],
|
||||
includeMatches: true,
|
||||
minMatchCharLength: 2,
|
||||
threshold: 0.5,
|
||||
@@ -28,12 +28,14 @@ export default function Search({ searchlist }) {
|
||||
<input
|
||||
id="search"
|
||||
type="text"
|
||||
className="focus:outline-none w-full pr-5 py-3.5"
|
||||
className="focus:outline-none w-full pr-5 py-3.5 rounded-r-xl"
|
||||
value={query}
|
||||
autoComplete="false"
|
||||
onChange={onChange}
|
||||
/>
|
||||
|
||||
{query.length > 1 && (
|
||||
<div className="absolute w-full top-full bg-white mt-2.5 p-5 rounded-xl drop-shadow space-y-2.5">
|
||||
<div className="absolute w-full top-full bg-white mt-1.5 p-5 rounded-xl drop-shadow space-y-2.5">
|
||||
<p>
|
||||
Encontrado {items.length} resultado(s) para '
|
||||
<strong>{query}</strong>'
|
||||
|
||||
Reference in New Issue
Block a user