-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #310 from pnp/dev
Merge for v2.1.0 release
- Loading branch information
Showing
80 changed files
with
8,836 additions
and
2,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"langs": ["bg-bg", "ca-es", "da-dk", "de-de", "el-gr", "es-es", "et-ee", "fi-fi", "fr-fr", "it-it", "ja-jp", "lt-lt", "lv-lv", "nb-no", "nl-nl", "pl-pl", "pt-pt", "ro-ro", "ru-ru", "sk-sk", "sr-latn-rs", "sv-se", "tr-tr", "vi-vn", "zh-cn", "zh-tw"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# PropertyFieldGuid control | ||
|
||
This control generates an input field for GUID. Incorrect GUID entered will result into an invalid input. | ||
|
||
**PropertyFieldGuid example usage** | ||
|
||
![PropertyFieldGuid example](../assets/PropertyFieldGuid.gif) | ||
|
||
## How to use this control in your solutions | ||
|
||
- Check that you installed the `@pnp/spfx-property-controls` dependency. Check out The [getting started](../../#getting-started) page for more information about installing the dependency. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { PropertyFieldGuid } from '@pnp/spfx-property-controls/lib/PropertyFieldGuid'; | ||
``` | ||
|
||
- Create a new property for your web part, for example: | ||
|
||
```TypeScript | ||
export interface IPropertyControlsTestWebPartProps { | ||
guid: string; | ||
} | ||
``` | ||
|
||
- Add the custom property control to the `groupFields` of the web part property pane configuration: | ||
|
||
```TypeScript | ||
PropertyFieldGuid('guid', { | ||
key: 'guid', | ||
label: "GUID", | ||
value: this.properties.guid | ||
}) | ||
``` | ||
|
||
- You can also implement the property your own error message with the `errorMessage` property with the following syntax: | ||
|
||
```TypeScript | ||
PropertyFieldGuid('guid', { | ||
key: 'guid', | ||
label: "GUID", | ||
value: this.properties.guid, | ||
errorMessage: "Please enter a correct GUID" | ||
}) | ||
``` | ||
|
||
## Implementation | ||
|
||
The `PropertyFieldGuid` control can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| key | string | yes | An unique key that indicates the identity of this control. | | ||
| label | string | yes | Property field label displayed on top. | | ||
| value | string | no | Value to be displayed in the Guid field. | | ||
| errorMessage | string | no | If set, this will be displayed as an error message. | | ||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldGuid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.