Minor update

This commit is contained in:
Anoop Tatti 2020-08-26 00:17:43 +01:00 committed by GitHub
parent 352182bfa0
commit 821ccc0eb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -19,11 +19,11 @@ const CascadingManagedMetadata: React.SFC<ICascadingManagedMetadataProps> = (pro
const [coordinates, setCoordinates] = React.useState<ICoordinates>({ latitude: null, longitude: null });
React.useEffect(() => {
_getCountries().then(terms => {
const options: IDropdownOption[] = terms.value.map(t => ({ key: t.id, text: t.labels[0].name }));
_getCountries().then(countries => {
const options: IDropdownOption[] = countries.value.map(c => ({ key: c.id, text: c.labels[0].name }));
setCountriesList(options);
});
});
}, []);
//* Get the country terms i.e. level 1 children using Graph
const _getCountries = async (): Promise<ITerms> => {