You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Updated tutorial on sharing data between web parts
* Updated guidance on sharing data between web parts
* Updated guidance on migrating jQuery DataTables solutions
* Updated guidance on migrating jQuery FullCalendar solutions
Type definitions for Moment.js are distributed together with the Moment.js package. Even though, you're loading Moment.js from a URL, in order to use its typings, you still need to install the Moment.js package in the project.
@@ -530,7 +530,7 @@ Having defined **$** as jQuery you can now remove the local definition of **$**
530
530
var $:any= (windowasany).$;
531
531
```
532
532
533
-
Because DataTables is a jQuery plugin that attaches itself to jQuery you cannot load its type definition directly. Instead, you have to add it to the list of types loaded globally. In the code editor, open the **./tsconfig.json** file and to the **types** array add **jquery.datatables**:
533
+
Because DataTables is a jQuery plugin that attaches itself to jQuery you cannot load its type definition directly. Instead, you have to add it to the list of types loaded globally. In the code editor, open the **./tsconfig.json** file and to the **types** array add **datatables.net**:
534
534
535
535
```json
536
536
{
@@ -544,7 +544,7 @@ Because DataTables is a jQuery plugin that attaches itself to jQuery you cannot
544
544
"types": [
545
545
"es6-promise",
546
546
"es6-collections",
547
-
"jquery.datatables",
547
+
"datatables.net",
548
548
"webpack-env"
549
549
]
550
550
}
@@ -607,7 +607,7 @@ export default class ItRequestsWebPart extends BaseClientSideWebPart<IItRequests
Copy file name to clipboardExpand all lines: docs/spfx/web-parts/guidance/migrate-jquery-fullcalendar-script-to-spfx.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ When prompted, define values as follows:
185
185
-**WebPart** as the client-side component to create
186
186
-**Tasks calendar** as your web part name
187
187
-**Shows tasks in the calendar view** as your web part description
188
-
-**No javaScript web framework** as the starting point to build the web part
188
+
-**No JavaScript web framework** as the starting point to build the web part
189
189
190
190

191
191
@@ -365,7 +365,7 @@ function updateTask(id, startDate, dueDate) {
365
365
}
366
366
```
367
367
368
-
This code is almost identical with the original code of the Script Editor Web Part customization. The only difference is that where the original code retrieved the URL of the current web from the global **\_spPageContextInfo** variable set by SharePoint (lines 8, 45, 96 and 104), the code in the SharePoint Framework uses a custom variable that you will have to set in the web part. SharePoint Framework client-side web parts can be used both on classic and modern pages. While the **_spPageContextInfo** variable is present on classic pages, it's not available on modern pages which is why you can't rely on it and need a custom property that you can control yourself instead.
368
+
This code is almost identical with the original code of the Script Editor Web Part customization. The only difference is that where the original code retrieved the URL of the current web from the global **\_spPageContextInfo** variable set by SharePoint (lines 8, 45, 96 and 104), the code in the SharePoint Framework uses a custom variable that you will have to set in the web part. SharePoint Framework client-side web parts can be used both on classic and modern pages. While the **\_spPageContextInfo** variable is present on classic pages, it's not available on modern pages which is why you can't rely on it and need a custom property that you can control yourself instead.
369
369
370
370
In order to reference this file in the web part, in the code editor, open the **./src/webparts/tasksCalendar/TasksCalendarWebPart.ts** file and change the **render** method to:
Copy file name to clipboardExpand all lines: docs/spfx/web-parts/guidance/share-data-between-web-parts.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# Share Data Between Client-Side Web Parts
2
2
3
-
> Note. This article has not yet been verified with the SPFx GA version, so you might have challenges making this work as described using the latest release.
4
-
5
3
When building client-side web parts, loading data once and reusing it across different web parts will help you improve the performance of your pages and decrease the load on your network. This article describes a number of approaches that you can use to share data across multiple web parts.
6
4
7
5
## Why Share Data Between Web Parts
@@ -327,12 +325,14 @@ SharePoint Framework services can be built using the same project build system a
If at some point you decided that it's better to move the **IDocument.ts** file to a subfolder or merge a few files together, the only thing that you would change is the path in the barrel definition (**./src/services/documentsService/index.ts**). All elements in the project could still use the exact same relative path to the **documentsService** folder to reference the `IDocument` interface.
0 commit comments