Skip to content

Commit

Permalink
frontend: Fix selecting a package for a channel
Browse files Browse the repository at this point in the history
It was not getting correctly selected due to the "setSelected" function
not being applied to the correct value in the AutoCompletePicker.
  • Loading branch information
joaquimrocha committed Aug 8, 2022
1 parent 1f59cde commit 48a1b87
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ export default function AutoCompletePicker(props: AutoCompletePickerProps) {
const classes = useStyles();

function onInputChange(event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) {
setSelectedValue(event.target.value);
props.onValueChanged(event.target.value);
}

Expand Down Expand Up @@ -234,6 +233,8 @@ export default function AutoCompletePicker(props: AutoCompletePickerProps) {
inputValue,
selectedItem,
}) => {
setSelectedValue(selectedItem);

const { onBlur, onFocus, ...inputProps } = getInputProps();

return (
Expand Down

0 comments on commit 48a1b87

Please sign in to comment.