Skip to content

Instantly share code, notes, and snippets.

@chrisobriensp
Last active January 25, 2017 17:39
Show Gist options
  • Select an option

  • Save chrisobriensp/8d683248bd6af07c923497035b64a679 to your computer and use it in GitHub Desktop.

Select an option

Save chrisobriensp/8d683248bd6af07c923497035b64a679 to your computer and use it in GitHub Desktop.
Code for a SharePoint Framework property pane with multiple pages. See http://cob-sp.com/SPFx-WP-Props1
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
return {
pages: [
{
header: {
description: "Basic settings"
},
groups: [
{
groupName: "Look and feel",
groupFields: [
PropertyPaneTextField('description', {
label: "Web part description"
}),
PropertyPaneTextField('noResultsMsg', {
label: "No results message"
})
]
}
]
},
{
header: {
description: "Advanced settings"
},
groups: [
{
groupName: "Search configuration",
groupFields: [
PropertyPaneTextField('searchTag', {
label: "Tag to search for"
}),
PropertyPaneDropdown('displayType', {
label: "Display type",
options: [
{ key: '2Cols', text: 'Two columns' },
{ key: '3Cols', text: 'Three columns' },
{ key: 'Horizontal', text: 'Horizontal'}
],
selectedKey: '3Cols'
}
})
]
}
]
}
]
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment