Last active
April 16, 2019 07:14
-
-
Save chrisobriensp/d0696bb23ece2297ffecdb3076cae9f5 to your computer and use it in GitHub Desktop.
Showing a simple way of populating an SPFX dropdown with code. See http://cob-sp.com/SPFx-WP-Props2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private fetchOptionsSimple(): Array<IPropertyPaneDropdownOption> { | |
| var options: Array<IPropertyPaneDropdownOption> = new Array<IPropertyPaneDropdownOption>(); | |
| options.push( { key: 'Added1', text: 'Added from code 1' }); | |
| options.push( { key: 'Added2', text: 'Added from code 2' }); | |
| return options; | |
| } | |
| protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { | |
| var fetchedOptions: Array<IPropertyPaneDropdownOption> = this.fetchOptions(); | |
| // other code for property pane here.. | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment