Skip to content

Instantly share code, notes, and snippets.

View Toumash's full-sized avatar

Tomasz Dłuski Toumash

View GitHub Profile
@Toumash
Toumash / FetchListsForWebPartPropsDropdown.ts
Created September 21, 2019 17:36 — forked from chrisobriensp/FetchListsForWebPartPropsDropdown.ts
Dynamically populate SPFX web part property dropdown list - using lists in current site. See http://cob-sp.com/SPFx-WP-Props2
/* need some imports e.g.:
import { IODataList } from '@microsoft/sp-odata-types';
import { SPHttpClient, SPHttpClientConfigurations, SPHttpClientConfiguration, SPHttpClientResponse, ODataVersion, ISPHttpClientConfiguration } from '@microsoft/sp-http';
*/
private dropdownOptions: IPropertyPaneDropdownOption[];
private listsFetched: boolean;
// these methods are split out to go step-by-step, but you could refactor and be more direct if you choose..