Skip to content

Commit fff13d7

Browse files
committed
Merge branch 'patch-6' of https://github.com/hyoshioka0128/sp-dev-docs into prrollup-formatting
2 parents 97e5feb + d9cc8a4 commit fff13d7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

docs/spfx/web-parts/get-started/connect-to-sharepoint.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ this.context.pageContext
8787

8888
## Define list model
8989

90-
You need a list model to start working with SharePoint list data. To retrieve the lists, you need two models.
90+
You need a list model to start working with SharePoint list data. To retrieve the lists, you need two models.
9191

9292
1. Switch to Visual Studio Code and go to **src\webparts\helloWorld\HelloWorldWebPart.ts**.
9393
1. Define the following `interface` models just above the **HelloWorldWebPart** class:
@@ -103,7 +103,7 @@ You need a list model to start working with SharePoint list data. To retrieve th
103103
}
104104
```
105105

106-
The **ISPList** interface holds the SharePoint list information that we are connecting to.
106+
The **ISPList** interface holds the SharePoint list information that we are connecting to.
107107

108108
## Retrieve lists from mock store
109109

@@ -122,7 +122,7 @@ To test in the local Workbench, you need a mock store that returns mock data.
122122
private static _items: ISPList[] = [{ Title: 'Mock List', Id: '1' },
123123
{ Title: 'Mock List 2', Id: '2' },
124124
{ Title: 'Mock List 3', Id: '3' }];
125-
125+
126126
public static get(): Promise<ISPList[]> {
127127
return new Promise<ISPList[]>((resolve) => {
128128
resolve(MockHttpClient._items);
@@ -134,10 +134,10 @@ To test in the local Workbench, you need a mock store that returns mock data.
134134
Things to note about the code:
135135

136136
- Because there are multiple exports in **HelloWorldWebPart.ts**, the specific one to import is specified by using `{ }`. In this case, only the data model `ISPList` is required.
137-
- You do not need to type the file extension when importing from the default module, which in this case is **HelloWorldWebPart**.
137+
- You do not need to type the file extension when importing from the default module, which in this case is **HelloWorldWebPart**.
138138
- It exports the **MockHttpClient** class as a default module so that it can be imported in other files.
139139
- It builds the initial `ISPList` mock array and returns.
140-
140+
141141
1. Save the file.
142142

143143
You can now use the **MockHttpClient** class in the **HelloWorldWebPart** class. You first need to import the **MockHttpClient** module.
@@ -150,7 +150,7 @@ You can now use the **MockHttpClient** class in the **HelloWorldWebPart** class.
150150
```ts
151151
import MockHttpClient from './MockHttpClient';
152152
```
153-
153+
154154
1. Add the following private method that mocks the list retrieval inside the **HelloWorldWebPart** class.
155155

156156
```ts
@@ -173,13 +173,13 @@ SharePoint Framework includes a helper class **spHttpClient** to execute REST AP
173173

174174
### To use this helper class, import them from the @microsoft/sp-http module
175175

176-
1. Scroll to the top of the **HelloWorldWebPart.ts** file.
176+
1. Scroll to the top of the **HelloWorldWebPart.ts** file.
177177
1. Copy and paste the following code just under `import MockHttpClient from './MockHttpClient';`:
178178

179179
```ts
180180
import {
181181
SPHttpClient,
182-
SPHttpClientResponse
182+
SPHttpClientResponse
183183
} from '@microsoft/sp-http';
184184
```
185185

@@ -196,7 +196,7 @@ SharePoint Framework includes a helper class **spHttpClient** to execute REST AP
196196

197197
The method uses the **spHttpClient** helper class and issues a `get` request. It uses the **ISPLists** model and also applies a filter to not retrieve hidden lists.
198198

199-
1. Save the file.
199+
1. Save the file.
200200
1. Switch to the console window that is running `gulp serve` and check if there are any errors. If there are errors, gulp reports them in the console, and you need to fix them before proceeding.
201201

202202
## Add new styles
@@ -255,7 +255,7 @@ The SharePoint Framework uses [Sass](http://sass-lang.com/) as the CSS pre-proce
255255

256256
Open the **HelloWorldWebPart** class.
257257

258-
SharePoint Workbench gives you the flexibility to test web parts in your local environment and from a SharePoint site. SharePoint Framework aids this capability by helping you understand which environment your web part is running from by using the **EnvironmentType** module.
258+
SharePoint Workbench gives you the flexibility to test web parts in your local environment and from a SharePoint site. SharePoint Framework aids this capability by helping you understand which environment your web part is running from by using the **EnvironmentType** module.
259259

260260
### To use the EnvironmentType module
261261

@@ -300,7 +300,7 @@ SharePoint Workbench gives you the flexibility to test web parts in your local e
300300
this._renderList(response.value);
301301
});
302302
}
303-
else if (Environment.type == EnvironmentType.SharePoint ||
303+
else if (Environment.type == EnvironmentType.SharePoint ||
304304
Environment.type == EnvironmentType.ClassicSharePoint) {
305305
this._getListData()
306306
.then((response) => {
@@ -364,7 +364,7 @@ SharePoint Workbench gives you the flexibility to test web parts in your local e
364364

365365
## Next steps
366366

367-
Congratulations on connecting your web part to SharePoint list data!
367+
Congratulations on connecting your web part to SharePoint list data!
368368

369369
You can continue building out your Hello World web part in the next topic [Deploy your web part to a SharePoint page](./serve-your-web-part-in-a-sharepoint-page.md). You will learn how to deploy and preview the Hello World web part in a SharePoint page.
370370

docs/spfx/web-parts/guidance/simplify-adding-web-parts-with-preconfigured-entries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ In the web part manifest, add web part properties so that users can configure th
299299

300300
For users to be able to use the newly defined properties to configure the web part, the properties must be displayed in the web part property pane.
301301

302-
1. In the code editor, open the **./src/webparts/gallery/GalleryWebPart.ts** file. In the top section of the file, change the **@microsoft/sp-webpart-base** import statement to:
302+
1. In the code editor, open the **./src/webparts/gallery/GalleryWebPart.ts** file. In the top section of the file, change the **\@microsoft/sp-webpart-base** import statement to:
303303

304304
```typescript
305305
import {

0 commit comments

Comments
 (0)