From 48a1b87c40f8821f6f7b9ce76e57170a83f96fc7 Mon Sep 17 00:00:00 2001 From: Joaquim Rocha Date: Mon, 8 Aug 2022 15:13:21 +0100 Subject: [PATCH] frontend: Fix selecting a package for a channel It was not getting correctly selected due to the "setSelected" function not being applied to the correct value in the AutoCompletePicker. --- .../common/AutoCompletePicker/AutoCompletePicker.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx b/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx index 8c5be589e..f8eec38ec 100644 --- a/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx +++ b/frontend/src/components/common/AutoCompletePicker/AutoCompletePicker.tsx @@ -189,7 +189,6 @@ export default function AutoCompletePicker(props: AutoCompletePickerProps) { const classes = useStyles(); function onInputChange(event: React.ChangeEvent) { - setSelectedValue(event.target.value); props.onValueChanged(event.target.value); } @@ -234,6 +233,8 @@ export default function AutoCompletePicker(props: AutoCompletePickerProps) { inputValue, selectedItem, }) => { + setSelectedValue(selectedItem); + const { onBlur, onFocus, ...inputProps } = getInputProps(); return (