Skip to content

Commit 59d8174

Browse files
Merge pull request #1150 from pnp/bug/1149-location-picker-suggestions
Bug/1149 location picker suggestions
2 parents 1b7052c + 5996f26 commit 59d8174

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CHANGELOG.JSON

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"SharePoint Framework v1.14.0 support"
1313
],
1414
"fixes": [
15-
"`FilePicker`: `defaultFolderAbsolutePath` doesn't work with `webAbsoluteUrl` [#1129](https://github.com/pnp/sp-dev-fx-controls-react/issues/1129)"
15+
"`FilePicker`: `defaultFolderAbsolutePath` doesn't work with `webAbsoluteUrl` [#1129](https://github.com/pnp/sp-dev-fx-controls-react/issues/1129)",
16+
"`LocationPicker`: Location picker not resolving locations [#1149](https://github.com/pnp/sp-dev-fx-controls-react/issues/1149)"
1617
]
1718
},
1819
"contributors": [

src/controls/locationPicker/LocationPicker.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { ILocationPickerProps, ILocationPickerState, Mode, ILocationBoxOption, ILocationPickerItem } from './ILocationPicker';
33
import styles from './LocationPicker.module.scss';
4-
import { SPHttpClient, ISPHttpClientOptions, SPHttpClientResponse, AadHttpClient } from '@microsoft/sp-http';
4+
import { SPHttpClient, ISPHttpClientOptions, SPHttpClientResponse, HttpClient, HttpClientResponse } from '@microsoft/sp-http';
55
import { Text } from 'office-ui-fabric-react/lib/Text';
66
import { Persona, PersonaSize } from 'office-ui-fabric-react/lib/Persona';
77
import { ComboBox } from 'office-ui-fabric-react/lib/ComboBox';
@@ -276,8 +276,7 @@ export class LocationPicker extends React.Component<ILocationPickerProps, ILocat
276276
body: `{"QueryConstraint":{"Query":"${searchText}"},"LocationProvider":32,"BingMarket":"en-IN"}`,
277277
headers: requestHeaders
278278
};
279-
let client1: AadHttpClient = await this.props.context.aadHttpClientFactory.getClient("https://outlook.office365.com");
280-
let response1 = await client1.post("https://outlook.office365.com/SchedulingB2/api/v1.0/me/findmeetinglocations", AadHttpClient.configurations.v1, spOpts);
279+
let response1: HttpClientResponse = await this.props.context.httpClient.post("https://outlook.office365.com/SchedulingB2/api/v1.0/me/findmeetinglocations", HttpClient.configurations.v1, spOpts);
281280
let json = await response1.json();
282281

283282

0 commit comments

Comments
 (0)