Merge pull request #11002 from overleaf/msm-fix-email-suggestion
[web] Fix clearing suggestions in email input GitOrigin-RevId: c821114e2112bf066f4ee5f01304321db983bc4e
This commit is contained in:
@@ -148,7 +148,9 @@ function Input({ onChange, handleAddNewEmail }: InputProps) {
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
if (suggestion && inputValue && !suggestion.startsWith(inputValue)) {
|
||||
if (!inputValue) {
|
||||
setSuggestion(null)
|
||||
} else if (suggestion && !suggestion.startsWith(inputValue)) {
|
||||
setSuggestion(null)
|
||||
}
|
||||
}, [suggestion, inputValue])
|
||||
|
||||
Reference in New Issue
Block a user