Skip to content

Commit 41370c5

Browse files
committed
broken people picker
1 parent 2b6020f commit 41370c5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ The People picker control can be configured with the following properties:
5959
| titleText | string | no | Text to be displayed on the control | |
6060
| groupName | string | no | group from which users are fetched. Leave it blank if need to filter all users | _none_ |
6161
| personSelectionLimit | number | no | Defines the limit of people that can be selected in the control | 1 |
62-
| isRequired | boolean | no | Set if the control is required or not | false |
62+
| required | boolean | no | Set if the control is required or not | false |
6363
| disabled | boolean | no | Set if the control is disabled or not | false |
64-
| errorMessage | string | no | Specifies the error message to display if the the control is required and no items selected | |
65-
| showRequiredError | boolean | no | Specifies if the component should show mandatory field error message because of some changes occured in parent. Use this props (set to `true`), for example, when "Save" button on the form has been clicked | |
64+
| errorMessage | string | no | Static error message displayed below the picker. Use `onGetErrorMessage` to dynamically change the error message displayed (if any) based on the current value. `errorMessage` and `onGetErrorMessage` are mutually exclusive (`errorMessage` takes precedence). | |
65+
| onGetErrorMessage | (items: IPersonaProps[]) => string \| Promise&lt;string&gt; | no | The method is used to get the validation error message and determine whether the picker value is valid or not. Mutually exclusive with the static string `errorMessage` (it will take precedence over this).<br />When it returns string:<ul><li>If valid, it returns empty string.</li><li>If invalid, it returns the error message string to be shown below the picker.</li></ul><br />When it returns Promise&lt;string&gt;:<ul><li>The resolved value is display as error message.</li><li>The rejected, the value is thrown away.</li></ul> | |
6666
| errorMessageClassName | string | no | applies custom styling to the error message section | |
6767
| showtooltip | boolean | no | Defines if need a tooltip or not | false |
6868
| tooltipMessage | string | no | Specify the tooltip message to display | |
6969
| tooltipDirectional | DirectionalHint | no | Direction where the tooltip would be shown | |
70-
| selectedItems | (items: IPersonaProps[]) => void | no | Get the selected users in the control. | |
70+
| onChange | (items: IPersonaProps[]) => void | no | Get the selected users in the control. | |
7171
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element | |
7272
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only | |
7373
| defaultSelectedUsers | string[] | no | Default selected user emails or login names | |

src/controls/peoplepicker/IPeoplePicker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ export interface IPeoplePickerProps {
5050
*/
5151
required?: boolean;
5252
/**
53-
* Static error message displayed below the text field. Use onGetErrorMessage to dynamically change the error message displayed (if any) based on the current value. errorMessage and onGetErrorMessage are mutually exclusive (errorMessage takes precedence).
53+
* Static error message displayed below the picker. Use onGetErrorMessage to dynamically change the error message displayed (if any) based on the current value. errorMessage and onGetErrorMessage are mutually exclusive (errorMessage takes precedence).
5454
*/
5555
errorMessage?: string;
5656
/**
57-
* The method is used to get the validation error message and determine whether the input value is valid or not.
57+
* The method is used to get the validation error message and determine whether the picker value is valid or not.
5858
* Mutually exclusive with the static string errorMessage (it will take precedence over this).
5959
*
6060
* When it returns string:
6161
* - If valid, it returns empty string.
62-
* - If invalid, it returns the error message string and the text field will
63-
* show a red border and show an error message below the text field.
62+
* - If invalid, it returns the error message string and the picker will
63+
* show an error message below the picker.
6464
*
6565
* When it returns Promise<string>:
6666
* - The resolved value is display as error message.

0 commit comments

Comments
 (0)