Skip to content

Commit c394504

Browse files
KoenZomersVesaJuvonen
authored andcommitted
Corrected sample property and added escape (SharePoint#4719)
The sample was incorrect as the property name according to the explanation was targetProperty. Updated the sample. Also included the use of escape(...) around it as that is a recommended practice for user input fields rendered on the screen.
1 parent 1c53b70 commit c394504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/spfx/web-parts/basics/integrate-with-property-pane.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export interface IHelloWorldWebPartProps {
101101
This is then available in your web part by using **this.properties.targetProperty**.
102102

103103
```typescript
104-
<p class="ms-font-l ms-fontColor-white">${this.properties.description}</p>
104+
<p class="ms-font-l ms-fontColor-white">${escape(this.properties.targetProperty)}</p>
105105
```
106106

107107
When the properties are defined, you can access them in your web part by using the **this.properties.[property-name]**. For more information, see [render method of the HelloWorldWebPart](../get-started/build-a-hello-world-web-part.md#web-part-render-method).

0 commit comments

Comments
 (0)