Skip to content

Commit dd82743

Browse files
committed
add usingRemoveActiveDescendant conditional
1 parent 4271f2f commit dd82743

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/src/FilteredActionList/FilteredActionList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ export function FilteredActionList({
244244
}, [items, inputRef, listContainerElement, usingRemoveActiveDescendant]) // Re-run when items change to update active indicators
245245

246246
useEffect(() => {
247-
if (!loading) {
247+
if (usingRemoveActiveDescendant && !loading) {
248248
setIsInputFocused(inputRef.current && inputRef.current === document.activeElement ? true : false)
249249
}
250-
}, [loading, inputRef])
250+
}, [loading, inputRef, usingRemoveActiveDescendant])
251251

252252
useAnnouncements(
253253
items,

0 commit comments

Comments
 (0)