Merge pull request #8166 from overleaf/msm-settings-fix-uni-autocomplete

[Settings] Fix university autocomplete

GitOrigin-RevId: ea6b539a25c9363e420a4f04a9522c34d860d4f2
This commit is contained in:
Timothée Alby 2022-05-26 14:58:29 +02:00 committed by Copybot
parent 00fa5b2d96
commit d4dd17d094

View file

@ -107,7 +107,13 @@ function InstitutionFields({
return []
}
return universities[countryCode]?.map(({ name }) => name) ?? []
return (
universities[countryCode]
?.map(({ name }) => name)
.filter(name =>
name.trim().toLowerCase().includes(universityName.toLowerCase())
) ?? []
)
}
const handleShowInstitutionFields = () => {