fix: Infinite request loop when changing user preferences with window open twice

This commit is contained in:
Tom Moor
2024-04-20 17:04:24 -04:00
parent f543792640
commit 9f3dd51b48

View File

@@ -145,6 +145,10 @@ const InputSelect = (props: Props, ref: React.RefObject<InputSelectRef>) => {
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]);