mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Prevent overflow on Search page by search results
This commit is contained in:
parent
f3765a20b9
commit
d8fe677933
1 changed files with 2 additions and 8 deletions
|
@ -159,13 +159,7 @@ export default function Search() {
|
|||
}, [isMobileWidth]);
|
||||
|
||||
function search() {
|
||||
if (searchResultsLoading) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!searchQuery.trim()) {
|
||||
return;
|
||||
}
|
||||
if (searchResultsLoading || !searchQuery.trim()) return;
|
||||
|
||||
const apiUrl = `/api/search?q=${encodeURIComponent(searchQuery)}&client=web`;
|
||||
fetch(apiUrl, {
|
||||
|
@ -246,7 +240,7 @@ export default function Search() {
|
|||
}
|
||||
{
|
||||
!focusSearchResult && searchResults && searchResults.length > 0 &&
|
||||
<div className='mt-4'>
|
||||
<div className='mt-4 max-w-[92vw] break-all'>
|
||||
<ScrollArea className="h-[80vh]">
|
||||
{
|
||||
searchResults.map((result, index) => {
|
||||
|
|
Loading…
Reference in a new issue