Skip to content

Commit 7481c19

Browse files
authored
Merge pull request #319 from traceroot-ai/fix/fix_log_search_ui_func
fix: fix log mode search and make search icon highlighted if searched
2 parents cb54213 + 161136e commit 7481c19

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ui/src/app/explore/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ export default function Explore() {
146146
// Clear selected traces and spans
147147
setSelectedTraceIds([]);
148148
setSelectedSpanIds([]);
149+
// Clear search terms when switching to log mode
150+
setMetadataSearchTerms([]);
151+
setLogSearchValue("");
149152
setIsLogMode(true);
150153

151154
// Rebuild URL with mode=log at the end

ui/src/components/explore/SearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ const SearchBar: React.FC<SearchBarProps> = ({
215215
size="icon"
216216
onClick={() => !disabled && setIsSearchExpanded(true)}
217217
disabled={disabled}
218-
className="w-10 h-10 flex-shrink-0"
218+
className={`w-10 h-10 flex-shrink-0 ${criteria.length > 0 ? "bg-zinc-100 dark:bg-zinc-800" : ""}`}
219219
>
220220
<Search className="w-4 h-4" />
221221
</Button>

0 commit comments

Comments
 (0)