Skip to content

Commit

Permalink
Cascading dropdown without custom controls sample (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
waldekmastykarz authored and VesaJuvonen committed Nov 22, 2016
1 parent 9a333ae commit d8d52a4
Show file tree
Hide file tree
Showing 15 changed files with 1,119 additions and 3 deletions.
15 changes: 15 additions & 0 deletions samples/react-custompropertypanecontrols/README.md
Expand Up @@ -12,6 +12,12 @@ Drop-down that loads its options asynchronously.

This control supports promises and chaining for cascading drop-downs where value from one field determines values in other drop-down fields.

### Drop-down with external data without using a custom control

Cascading drop-downs in the property pane both using external data.

![Web part with cascading drop-downs in the property pane](./assets/cascading-dropdown-preview.gif)

## Applies to

* [SharePoint Framework Developer Preview](http://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview)
Expand All @@ -27,6 +33,7 @@ react-custompropertypanecontrols|Waldek Mastykarz (MVP, Rencore, @waldekm)

Version|Date|Comments
-------|----|--------
2.0.0|November 22, 2016|Added new sample web part (Dropdown with remote data (without custom controls))
1.0.0|October 17, 2016|Initial release

## Disclaimer
Expand All @@ -44,6 +51,10 @@ Version|Date|Comments

By default the control uses mock data. If you want to test the control with SharePoint, change the commented sections in the **DropdownWithRemoteDataWebPart.ts** file inside the **loadLists** and **loadItems** functions and deploy the sample web part to your SharePoint developer tenant.

### Drop-down with external data without using a custom control

By default the web part uses mock data. If you want to test it with SharePoint, change the commented sections in the **DropdownWithRemoteDataWithoutCustomControlsWebPart.ts** file inside the **loadLists** and **loadItems** methods and deploy the sample web part to your SharePoint tenant.

## Features

Sample web parts in this solution illustrate the following concepts on top of the SharePoint Framework:
Expand All @@ -54,5 +65,9 @@ Sample web parts in this solution illustrate the following concepts on top of th
- linking multiple custom property pane controls together
- loading data for use in custom property pane controls asynchronously without blocking the web part
- forcing React components to repaint using an external trigger
- displaying a custom loading indicator
- reacting to web part property changes
- updating properties of web part property pane controls
- refreshing the web part property pane from web part

![](https://telemetry.sharepointpnp.com/sp-dev-fx-webparts/samples/react-custompropertypanecontrols)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion samples/react-custompropertypanecontrols/config/config.json
Expand Up @@ -4,6 +4,11 @@
"entry": "./lib/webparts/dropdownWithRemoteData/DropdownWithRemoteDataWebPart.js",
"manifest": "./src/webparts/dropdownWithRemoteData/DropdownWithRemoteDataWebPart.manifest.json",
"outputPath": "./dist/dropdown-with-remote-data.bundle.js"
},
{
"entry": "./lib/webparts/dropdownWithRemoteDataWithoutCustomControls/DropdownWithRemoteDataWithoutCustomControlsWebPart.js",
"manifest": "./src/webparts/dropdownWithRemoteDataWithoutCustomControls/DropdownWithRemoteDataWithoutCustomControlsWebPart.manifest.json",
"outputPath": "./dist/dropdown-with-remote-data-without-custom-controls.bundle.js"
}
],
"externals": {
Expand All @@ -16,6 +21,7 @@
"react-dom/server": "node_modules/react-dom/dist/react-dom-server.min.js"
},
"localizedResources": {
"dropdownWithRemoteDataStrings": "webparts/dropdownWithRemoteData/loc/{locale}.js"
"dropdownWithRemoteDataStrings": "webparts/dropdownWithRemoteData/loc/{locale}.js",
"dropdownWithRemoteDataWithoutCustomControlsStrings": "webparts/dropdownWithRemoteDataWithoutCustomControls/loc/{locale}.js"
}
}
Expand Up @@ -2,7 +2,7 @@
"solution": {
"name": "react-custompropertypanecontrols-client-side-solution",
"id": "21ba0db9-71ef-4f6b-8463-ce29e77e19f4",
"version": "1.0.0.0"
"version": "2.0.0.0"
},
"paths": {
"zippedPackage": "solution/react-custompropertypanecontrols.spapp"
Expand Down

0 comments on commit d8d52a4

Please sign in to comment.