Add autofocus for searchbar (#1408)

This commit is contained in:
Meier Lukas
2023-09-18 19:30:22 +02:00
committed by GitHub
parent 4a30e327a3
commit 141c27cda7
11 changed files with 47 additions and 5 deletions

View File

@@ -19,6 +19,7 @@ import { useNamedWrapperColumnCount } from '~/components/Dashboard/Wrappers/grid
import { BoardHeadOverride } from '~/components/layout/Meta/BoardHeadOverride';
import { HeaderActionButton } from '~/components/layout/header/ActionButton';
import { useConfigContext } from '~/config/provider';
import { useScreenLargerThan } from '~/hooks/useScreenLargerThan';
import { api } from '~/utils/api';
import { MainLayout } from './MainLayout';
@@ -30,9 +31,13 @@ type BoardLayoutProps = {
export const BoardLayout = ({ children, dockerEnabled }: BoardLayoutProps) => {
const { config } = useConfigContext();
const { data: session } = useSession();
return (
<MainLayout headerActions={<HeaderActions dockerEnabled={dockerEnabled} />}>
<MainLayout
autoFocusSearch={session?.user.autoFocusSearch}
headerActions={<HeaderActions dockerEnabled={dockerEnabled} />}
>
<BoardHeadOverride />
<BackgroundImage />
{children}