mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 17:26:26 +01:00
♻️ Remove auto focus from search
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { Autocomplete, Group, Kbd, Modal, Text, Tooltip, useMantineTheme } from '@mantine/core';
|
import { Autocomplete, Group, Kbd, Modal, Text, Tooltip, useMantineTheme } from '@mantine/core';
|
||||||
import { useDisclosure, useHotkeys } from '@mantine/hooks';
|
import { useDisclosure, useHotkeys, useMediaQuery } from '@mantine/hooks';
|
||||||
import {
|
import {
|
||||||
IconBrandYoutube,
|
IconBrandYoutube,
|
||||||
IconDownload,
|
IconDownload,
|
||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
TablerIconsProps,
|
TablerIconsProps,
|
||||||
} from '@tabler/icons-react';
|
} from '@tabler/icons-react';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { ReactNode, forwardRef, useMemo, useRef, useState } from 'react';
|
import { ReactNode, forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
import { useConfigContext } from '~/config/provider';
|
import { useConfigContext } from '~/config/provider';
|
||||||
import { api } from '~/utils/api';
|
import { api } from '~/utils/api';
|
||||||
|
|
||||||
@@ -48,7 +48,6 @@ export const Search = ({ isMobile }: SearchProps) => {
|
|||||||
variant="filled"
|
variant="filled"
|
||||||
placeholder="Search..."
|
placeholder="Search..."
|
||||||
hoverOnSearchChange
|
hoverOnSearchChange
|
||||||
autoFocus={typeof window !== 'undefined' && window.innerWidth > 768}
|
|
||||||
rightSection={
|
rightSection={
|
||||||
<IconSearch
|
<IconSearch
|
||||||
onClick={() => ref.current?.focus()}
|
onClick={() => ref.current?.focus()}
|
||||||
|
|||||||
Reference in New Issue
Block a user