Skip to content

Commit 4271f2f

Browse files
committed
loading fix
1 parent 0fbf871 commit 4271f2f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/react/src/FilteredActionList/FilteredActionList.tsx

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

246+
useEffect(() => {
247+
if (!loading) {
248+
setIsInputFocused(inputRef.current && inputRef.current === document.activeElement ? true : false)
249+
}
250+
}, [loading, inputRef])
251+
246252
useAnnouncements(
247253
items,
248254
usingRemoveActiveDescendant ? listRef : {current: listContainerElement},

0 commit comments

Comments
 (0)