diff --git a/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js b/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js index 5c0e2c0e56..be3829a916 100644 --- a/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js +++ b/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js @@ -84,11 +84,6 @@ export default function SelectCollaborators({ itemToString: item => item && item.name, onStateChange: ({ inputValue, type, selectedItem }) => { switch (type) { - // set inputValue when the input changes - case useCombobox.stateChangeTypes.InputChange: - setInputValue(inputValue) - break - // add a selected item on Enter (keypress), click or blur case useCombobox.stateChangeTypes.InputKeyDownEnter: case useCombobox.stateChangeTypes.ItemClick: @@ -177,6 +172,9 @@ export default function SelectCollaborators({ addNewItem(inputValue, false) } }, + onChange: e => { + setInputValue(e.target.value) + }, onKeyDown: event => { switch (event.key) { case 'Enter':