Skip to content

Commit 3458845

Browse files
committed
ack PR comments
1 parent dea684c commit 3458845

File tree

1 file changed

+9
-19
lines changed
  • apps/sim/app/workspace/[workspaceId]/logs/components/search

1 file changed

+9
-19
lines changed

apps/sim/app/workspace/[workspaceId]/logs/components/search/search.tsx

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ export function AutocompleteSearch({
8484
getSuggestions: (input) => suggestionEngine.getSuggestions(input),
8585
})
8686

87+
// Initialize from external value (URL params) - only on mount
8788
useEffect(() => {
8889
if (value) {
8990
const parsed = parseQuery(value)
9091
initializeFromQuery(parsed.textSearch, parsed.filters)
9192
}
93+
// eslint-disable-next-line react-hooks/exhaustive-deps
9294
}, [])
9395

9496
const [dropdownWidth, setDropdownWidth] = useState(500)
@@ -123,12 +125,6 @@ export function AutocompleteSearch({
123125

124126
return (
125127
<div className={cn('relative', className)}>
126-
<style jsx>{`
127-
.scrollable-badges::-webkit-scrollbar {
128-
display: none;
129-
}
130-
`}</style>
131-
132128
{/* Search Input with Inline Badges */}
133129
<Popover
134130
open={isOpen}
@@ -147,13 +143,7 @@ export function AutocompleteSearch({
147143
/>
148144

149145
{/* Scrollable container for badges */}
150-
<div
151-
className='scrollable-badges flex flex-1 items-center gap-1.5 overflow-x-auto px-2'
152-
style={{
153-
scrollbarWidth: 'none',
154-
msOverflowStyle: 'none',
155-
}}
156-
>
146+
<div className='flex flex-1 items-center gap-1.5 overflow-x-auto px-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden'>
157147
{/* Applied Filter Badges */}
158148
{appliedFilters.map((filter, index) => (
159149
<Button
@@ -239,8 +229,8 @@ export function AutocompleteSearch({
239229
data-index={0}
240230
className={cn(
241231
'w-full px-3 py-1.5 text-left transition-colors focus:outline-none',
242-
'hover:bg-[var(--surface-7)] dark:hover:bg-[var(--surface-10)]',
243-
highlightedIndex === 0 && 'bg-[var(--surface-7)] dark:bg-[var(--surface-10)]'
232+
'hover:bg-[var(--surface-9)] dark:hover:bg-[var(--surface-9)]',
233+
highlightedIndex === 0 && 'bg-[var(--surface-9)] dark:bg-[var(--surface-9)]'
244234
)}
245235
onMouseEnter={() => setHighlightedIndex(0)}
246236
onMouseDown={(e) => {
@@ -269,8 +259,8 @@ export function AutocompleteSearch({
269259
data-index={index}
270260
className={cn(
271261
'w-full px-3 py-1.5 text-left transition-colors focus:outline-none',
272-
'hover:bg-[var(--surface-7)] dark:hover:bg-[var(--surface-10)]',
273-
isHighlighted && 'bg-[var(--surface-7)] dark:bg-[var(--surface-10)]'
262+
'hover:bg-[var(--surface-9)] dark:hover:bg-[var(--surface-9)]',
263+
isHighlighted && 'bg-[var(--surface-9)] dark:bg-[var(--surface-9)]'
274264
)}
275265
onMouseEnter={() => setHighlightedIndex(index)}
276266
onMouseDown={(e) => {
@@ -312,9 +302,9 @@ export function AutocompleteSearch({
312302
data-index={index}
313303
className={cn(
314304
'w-full px-3 py-1.5 text-left transition-colors focus:outline-none',
315-
'hover:bg-[var(--surface-7)] dark:hover:bg-[var(--surface-10)]',
305+
'hover:bg-[var(--surface-9)] dark:hover:bg-[var(--surface-9)]',
316306
index === highlightedIndex &&
317-
'bg-[var(--surface-7)] dark:bg-[var(--surface-10)]'
307+
'bg-[var(--surface-9)] dark:bg-[var(--surface-9)]'
318308
)}
319309
onMouseEnter={() => setHighlightedIndex(index)}
320310
onMouseDown={(e) => {

0 commit comments

Comments
 (0)