mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: auto enter
This commit is contained in:
1 parent
4ff7d23027
commit
337398debe
1 file changed
+2
-2
@@ -36,7 +36,7 @@ export function SearchBar({ topResult }: SearchBarProps) {
|
||||
}, []);
|
||||
const handleKeyDown = useCallback<KeyboardEventHandler>(
|
||||
(event) => {
|
||||
if (event.key !== 'Enter' || !topResult) return;
|
||||
if (event.key !== 'Enter' || !topResult || searching) return;
|
||||
|
||||
event.preventDefault();
|
||||
router.push(`/tools/tankopedia/${topResult.id}`);
|
||||
@@ -58,7 +58,7 @@ export function SearchBar({ topResult }: SearchBarProps) {
|
||||
{searching ? <Spinner /> : <MagnifyingGlassIcon />}
|
||||
</TextField.Slot>
|
||||
|
||||
{topResult && (
|
||||
{topResult && !searching && (
|
||||
<TextField.Slot>
|
||||
<Link href={`/tools/tankopedia/${topResult.id}`}>
|
||||
<Button variant="ghost">
|
||||
|
||||
Reference in new issue
Block a user