From 89946aed15fbc1aae273b63944651c90b18940b6 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 29 Oct 2024 01:31:19 +1100 Subject: [PATCH] [PUI] Search tweak (#8381) * Cleanup buttons and add Tooltip * Clearer separation * Link cleanup --- .../src/components/nav/SearchDrawer.tsx | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/frontend/src/components/nav/SearchDrawer.tsx b/src/frontend/src/components/nav/SearchDrawer.tsx index 4f69d37553..15180edf50 100644 --- a/src/frontend/src/components/nav/SearchDrawer.tsx +++ b/src/frontend/src/components/nav/SearchDrawer.tsx @@ -14,7 +14,8 @@ import { Space, Stack, Text, - TextInput + TextInput, + Tooltip } from '@mantine/core'; import { useDebouncedValue } from '@mantine/hooks'; import { @@ -69,8 +70,8 @@ function QueryResultGroup({ return ( {query.results.results.map((result: any) => ( onResultClick(query.model, result.pk, event) } - key={result.pk} + key={`result-${query.model}-${result.pk}`} > @@ -376,7 +378,6 @@ export function SearchDrawer({ setValue(event.currentTarget.value)} leftSection={} @@ -387,19 +388,22 @@ export function SearchDrawer({ } styles={{ root: { width: '100%' } }} /> - searchQuery.refetch()} - > - - + + searchQuery.refetch()} + > + + + - - - + + + + + {t`Search Options`} @@ -410,7 +414,6 @@ export function SearchDrawer({ onChange={(event) => setSearchRegex(event.currentTarget.checked) } - radius="sm" /> @@ -420,7 +423,6 @@ export function SearchDrawer({ onChange={(event) => setSearchWhole(event.currentTarget.checked) } - radius="sm" />