mirror of
https://github.com/nix-community/noogle.git
synced 2024-11-29 23:02:22 +03:00
fix autonavigation
This commit is contained in:
parent
c5ebb4f20c
commit
8508ff085c
@ -78,13 +78,13 @@ export function SearchInput(props: SearchInputProps) {
|
|||||||
includeInputInList
|
includeInputInList
|
||||||
aria-label={"search"}
|
aria-label={"search"}
|
||||||
onInputChange={(e, value, reason) => {
|
onInputChange={(e, value, reason) => {
|
||||||
if (reason === "reset") {
|
if (reason === "reset" && e) {
|
||||||
console.log({ value, reason });
|
console.log({ e, value, reason });
|
||||||
handleSubmit(value);
|
if (value) {
|
||||||
// if (value) {
|
router.push(`/f/${value.split(".").join("/")}`);
|
||||||
// router.push(`/f/${value.split(".").join("/")}`);
|
} else {
|
||||||
// } else {
|
handleSubmit(value);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
options={data.map((e) => e.meta.title)}
|
options={data.map((e) => e.meta.title)}
|
||||||
|
Loading…
Reference in New Issue
Block a user