From 9f3dd51b48f1f6a7462304badc92e8cfe989520e Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 20 Apr 2024 17:04:24 -0400 Subject: [PATCH] fix: Infinite request loop when changing user preferences with window open twice --- app/components/InputSelect.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/InputSelect.tsx b/app/components/InputSelect.tsx index ee0960ee7..f420af385 100644 --- a/app/components/InputSelect.tsx +++ b/app/components/InputSelect.tsx @@ -145,6 +145,10 @@ const InputSelect = (props: Props, ref: React.RefObject) => { React.useEffect(() => { previousValue.current = value; + + // Update the selected value if it changes from the outside – both of these lines are needed + // for correct functioning + select.selectedValue = value; select.setSelectedValue(value); }, [value]);