fix: docs search box closing too fast (#417)
This commit is contained in:
parent
d17378d557
commit
0fd6f823d9
@ -99,7 +99,7 @@ const SearchModal: FC<SearchModalProps> = ({ open, onClose, searchablePages }) =
|
|||||||
setCanFocus(true);
|
setCanFocus(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
onClose();
|
onClose();
|
||||||
});
|
}, 100);
|
||||||
}, [onClose]);
|
}, [onClose]);
|
||||||
|
|
||||||
const handleSearchChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {
|
const handleSearchChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {
|
||||||
|
@ -58,24 +58,12 @@ interface SearchResultProps {
|
|||||||
const SearchResult = ({ entry: { url, title }, summary, onClick }: SearchResultProps) => {
|
const SearchResult = ({ entry: { url, title }, summary, onClick }: SearchResultProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
// const Icon = useMemo(() => {
|
|
||||||
// switch (type) {
|
|
||||||
// case NEWS:
|
|
||||||
// return ArticleIcon;
|
|
||||||
// case BULLETIN:
|
|
||||||
// return NewspaperIcon;
|
|
||||||
// default:
|
|
||||||
// return WebIcon;
|
|
||||||
// }
|
|
||||||
// }, [type]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
component={Link}
|
component={Link}
|
||||||
href={url}
|
href={url}
|
||||||
key={`result-${url}`}
|
key={`result-${url}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
// startIcon={<Icon fontSize="large" />}
|
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'flex-start',
|
alignItems: 'flex-start',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user