mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
🔥 Remove the popover TIP when using the searchbar
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Kbd, createStyles, Text, Popover, Autocomplete } from '@mantine/core';
|
import { Kbd, createStyles, Text, Popover, Autocomplete, Tooltip } from '@mantine/core';
|
||||||
import { useDebouncedValue, useForm, useHotkeys } from '@mantine/hooks';
|
import { useDebouncedValue, useForm, useHotkeys } from '@mantine/hooks';
|
||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import {
|
import {
|
||||||
@@ -107,40 +107,21 @@ export default function SearchBar(props: any) {
|
|||||||
}, 20);
|
}, 20);
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Popover
|
<Autocomplete
|
||||||
opened={opened}
|
autoFocus
|
||||||
position="bottom"
|
variant="filled"
|
||||||
placement="start"
|
data={autocompleteData}
|
||||||
width={260}
|
icon={icon}
|
||||||
withArrow
|
ref={textInput}
|
||||||
|
rightSectionWidth={90}
|
||||||
|
rightSection={rightSection}
|
||||||
radius="md"
|
radius="md"
|
||||||
trapFocus={false}
|
size="md"
|
||||||
transition="pop-bottom-right"
|
styles={{ rightSection: { pointerEvents: 'none' } }}
|
||||||
onFocusCapture={() => setOpened(true)}
|
placeholder="Search the web..."
|
||||||
onBlurCapture={() => setOpened(false)}
|
{...props}
|
||||||
target={
|
{...form.getInputProps('query')}
|
||||||
<Autocomplete
|
/>
|
||||||
autoFocus
|
|
||||||
variant="filled"
|
|
||||||
data={autocompleteData}
|
|
||||||
icon={icon}
|
|
||||||
ref={textInput}
|
|
||||||
rightSectionWidth={90}
|
|
||||||
rightSection={rightSection}
|
|
||||||
radius="md"
|
|
||||||
size="md"
|
|
||||||
styles={{ rightSection: { pointerEvents: 'none' } }}
|
|
||||||
placeholder="Search the web..."
|
|
||||||
{...props}
|
|
||||||
{...form.getInputProps('query')}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Text>
|
|
||||||
Tip: Use the prefixes <b>!yt</b> and <b>!t</b> in front of your query to search on YouTube
|
|
||||||
or for a Torrent respectively.
|
|
||||||
</Text>
|
|
||||||
</Popover>
|
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user