From 28346f47401941fdd8c2632c09bb88116e219fd7 Mon Sep 17 00:00:00 2001 From: Tse Kit Yam Date: Fri, 16 Nov 2018 10:29:44 +0800 Subject: [PATCH] [People Picker] change `titleText` to non-requied property --- docs/documentation/docs/controls/PeoplePicker.md | 2 +- src/controls/peoplepicker/IPeoplePicker.ts | 2 +- src/controls/peoplepicker/PeoplePickerComponent.tsx | 2 +- src/loc/de-de.ts | 1 - src/loc/en-us.ts | 1 - src/loc/fr-fr.ts | 1 - src/loc/mystrings.d.ts | 1 - src/loc/nl-nl.ts | 1 - 8 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/documentation/docs/controls/PeoplePicker.md b/docs/documentation/docs/controls/PeoplePicker.md index 8275b0568..6212c5d0a 100644 --- a/docs/documentation/docs/controls/PeoplePicker.md +++ b/docs/documentation/docs/controls/PeoplePicker.md @@ -55,7 +55,7 @@ The People picker control can be configured with the following properties: | Property | Type | Required | Description | Default | | ---- | ---- | ---- | ---- | ---- | | context | WebPartContext | yes | Context of the current web part. | | -| titleText | string | yes | Text to be displayed on the control | | +| titleText | string | no | Text to be displayed on the control | | | groupName | string | no | group from which users are fetched. Leave it blank if need to filter all users | _none_ | | personSelectionLimit | number | no | Defines the limit of people that can be selected in the control | | | isRequired | boolean | no | Set if the control is required or not | false | diff --git a/src/controls/peoplepicker/IPeoplePicker.ts b/src/controls/peoplepicker/IPeoplePicker.ts index 16282355b..fd3baba3c 100644 --- a/src/controls/peoplepicker/IPeoplePicker.ts +++ b/src/controls/peoplepicker/IPeoplePicker.ts @@ -15,7 +15,7 @@ export interface IPeoplePickerProps { /** * Text of the Control */ - titleText: string; + titleText?: string; /** * Web Absolute Url of source site */ diff --git a/src/controls/peoplepicker/PeoplePickerComponent.tsx b/src/controls/peoplepicker/PeoplePickerComponent.tsx index 94669b78a..df21e1e46 100644 --- a/src/controls/peoplepicker/PeoplePickerComponent.tsx +++ b/src/controls/peoplepicker/PeoplePickerComponent.tsx @@ -407,7 +407,7 @@ export class PeoplePicker extends React.Component - + {this.props.titleText && } { peoplePickerComponentTooltipMessage: "People Picker", peoplePickerComponentErrorMessage: "Benutzerauswahl ist ein Pflichtfeld", - peoplePickerComponentTitleText: "Benutzer auswählen", peoplePickerSuggestionsHeaderText: 'Vorgeschlagene Benutzer', peoplePickerLoadingText: 'Laden', diff --git a/src/loc/en-us.ts b/src/loc/en-us.ts index 4948bbc2a..2676ee25b 100644 --- a/src/loc/en-us.ts +++ b/src/loc/en-us.ts @@ -48,7 +48,6 @@ define([], () => { peoplePickerComponentTooltipMessage: "People Picker", peoplePickerComponentErrorMessage: "Required Field", - peoplePickerComponentTitleText: "Pick the user(s)", peoplePickerSuggestionsHeaderText: 'Suggested People', peoplePickerLoadingText: 'Loading', diff --git a/src/loc/fr-fr.ts b/src/loc/fr-fr.ts index 75359af7a..dd7283d5e 100644 --- a/src/loc/fr-fr.ts +++ b/src/loc/fr-fr.ts @@ -48,7 +48,6 @@ define([], () => { peoplePickerComponentTooltipMessage: "Sélecteur de personnes", peoplePickerComponentErrorMessage: "Le sélecteur de personnes est obligatoire", - peoplePickerComponentTitleText: "Choisissez l'utilisateur(s)", peoplePickerSuggestionsHeaderText: 'Personnes suggérées', peoplePickerLoadingText: 'Chargement', diff --git a/src/loc/mystrings.d.ts b/src/loc/mystrings.d.ts index 2b58ffa1b..75611da04 100644 --- a/src/loc/mystrings.d.ts +++ b/src/loc/mystrings.d.ts @@ -1,7 +1,6 @@ declare interface IControlStrings { peoplePickerComponentTooltipMessage: string; peoplePickerComponentErrorMessage: string; - peoplePickerComponentTitleText: string; peoplePickerSuggestionsHeaderText: string; genericNoResultsFoundText: string; peoplePickerLoadingText: string; diff --git a/src/loc/nl-nl.ts b/src/loc/nl-nl.ts index 541730aab..66f3e4503 100644 --- a/src/loc/nl-nl.ts +++ b/src/loc/nl-nl.ts @@ -48,7 +48,6 @@ define([], () => { peoplePickerComponentTooltipMessage: "Personen kiezen", peoplePickerComponentErrorMessage: "Verplicht veld", - peoplePickerComponentTitleText: "Kies personen", peoplePickerSuggestionsHeaderText: 'Voorgestelde personen', peoplePickerLoadingText: 'Laden',