mirror of
https://github.com/docmost/docmost.git
synced 2026-08-25 15:57:11 +08:00
minor search filter fixes
This commit is contained in:
@@ -274,7 +274,8 @@ export function SearchSpotlightFilters({
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{orderedVisibleFilters.map((filterKey) => {
|
||||
{!isAiMode &&
|
||||
orderedVisibleFilters.map((filterKey) => {
|
||||
if (filterKey === "creator") {
|
||||
return (
|
||||
<CreatorFilterMenu
|
||||
@@ -340,7 +341,7 @@ export function SearchSpotlightFilters({
|
||||
return null;
|
||||
})}
|
||||
|
||||
{addableFilters.length > 0 && (
|
||||
{!isAiMode && addableFilters.length > 0 && (
|
||||
<Menu
|
||||
shadow="md"
|
||||
width={200}
|
||||
|
||||
@@ -205,7 +205,7 @@ export function SearchSpotlight({ spaceId }: SearchSpotlightProps) {
|
||||
? query.length > 0 && !isAiLoading && !aiSearchResult
|
||||
? t("No answer available")
|
||||
: ""
|
||||
: query.length > 0 && !isFetching
|
||||
: (query.length > 0 || isFilterBrowse) && !isFetching
|
||||
? resultItems.length === 0
|
||||
? t("No results found")
|
||||
: t("{{count}} results found", { count: resultItems.length })
|
||||
@@ -245,7 +245,9 @@ export function SearchSpotlight({ spaceId }: SearchSpotlightProps) {
|
||||
|
||||
{resultItems.length > 0 && <>{resultItems}</>}
|
||||
|
||||
{(query.length > 0 || isFilterBrowse) && isFetching && (
|
||||
{(query.length > 0 || isFilterBrowse) &&
|
||||
isFetching &&
|
||||
resultItems.length === 0 && (
|
||||
<Spotlight.Empty>
|
||||
<Text size="sm" style={{ marginTop: 10 }}>
|
||||
{t("Searching...")}
|
||||
|
||||
Reference in New Issue
Block a user