Update README.md
This commit is contained in:
parent
4f19479a38
commit
a4ec663c22
|
@ -55,7 +55,7 @@ All of the components are placed under the [components](./src/webparts/todo/comp
|
||||||
|
|
||||||
The code ensures that the web part file, [TodoWebPart.ts](./src/webparts/todo/TodoWebPart.ts), only handles the key web part specific operations including property pane.
|
The code ensures that the web part file, [TodoWebPart.ts](./src/webparts/todo/TodoWebPart.ts), only handles the key web part specific operations including property pane.
|
||||||
|
|
||||||
While you can choose from many patterns, this kind of an approach, to break into multiple components and handling only the web part specific code in the web part file, is highly recommended to keep your react based code structured and well formed.
|
While you can choose from many patterns, this kind of an approach, to break into multiple components and handling only the web part specific code in the web part file, helps to keep your react based web part structured and well formed.
|
||||||
|
|
||||||
### Status Renderers
|
### Status Renderers
|
||||||
|
|
||||||
|
@ -171,6 +171,8 @@ You can see this in action in the the [TodoContainer.tsx](./src/webparts/todo/co
|
||||||
### Loading SharePoint data in property pane
|
### Loading SharePoint data in property pane
|
||||||
One of the things you may want to do in your web part is the ability to configure the data source of your web part. For example, selecting a SharePoint list to bind to. Usually, this is presented in the web part property pane. However, this requires you fetch the available lists from the SharePoint site.
|
One of the things you may want to do in your web part is the ability to configure the data source of your web part. For example, selecting a SharePoint list to bind to. Usually, this is presented in the web part property pane. However, this requires you fetch the available lists from the SharePoint site.
|
||||||
|
|
||||||
|
Today with the limited support in SharePoint Framework developer preview, this operation is done when the web part is initialized. However, the framework will provide better support for this operation as we progress towards GA from preview.
|
||||||
|
|
||||||
[TodoWebPart.ts](./src/webparts/todo/TodoWebPart.ts) demonstrates an approach that will help you fetch data from SharePoint and populate a property pane field, in this case, a dropdown. This operation is performed in the `onInit` method where it calls the `_getTaskLists` method to query the data source and populate the corresponding property pane dropdown field property array:
|
[TodoWebPart.ts](./src/webparts/todo/TodoWebPart.ts) demonstrates an approach that will help you fetch data from SharePoint and populate a property pane field, in this case, a dropdown. This operation is performed in the `onInit` method where it calls the `_getTaskLists` method to query the data source and populate the corresponding property pane dropdown field property array:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
|
Loading…
Reference in New Issue