Skip to content

Commit

Permalink
feat/#958 fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Morozov committed Jul 19, 2021
1 parent b11c175 commit a977ca5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.JSON
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@
"Dutch localization added [#100](https://github.com/pnp/sp-dev-fx-controls-react/issues/100)",
"German localization added [#101](https://github.com/pnp/sp-dev-fx-controls-react/issues/101)",
"French localization added [#102](https://github.com/pnp/sp-dev-fx-controls-react/issues/102)",
"`PeoplePicker`: Move defaultSelectedUsers from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/pnp/sp-dev-fx-controls-react/issues/135)",
"`PeoplePicker`: Move defaultSelectedItems from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/pnp/sp-dev-fx-controls-react/issues/135)",
"`PeoplePicker`: Initialize with users from a list item [#138](https://github.com/pnp/sp-dev-fx-controls-react/issues/138)",
"`PeoplePicker`: Remove Messagebar error handling to match Office UI Fabric field error styling [#140](https://github.com/pnp/sp-dev-fx-controls-react/issues/140)",
"`PeoplePicker`: REST API filter and nometadata header added to reduce payload [#139](https://github.com/pnp/sp-dev-fx-controls-react/issues/139)",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ Special thanks to our contributors (in alphabetical order): [Hugo Bernier](https
- Dutch localization added [#100](https://github.com/pnp/sp-dev-fx-controls-react/issues/100)
- German localization added [#101](https://github.com/pnp/sp-dev-fx-controls-react/issues/101)
- French localization added [#102](https://github.com/pnp/sp-dev-fx-controls-react/issues/102)
- `PeoplePicker`: Move defaultSelectedUsers from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/pnp/sp-dev-fx-controls-react/issues/135)
- `PeoplePicker`: Move defaultSelectedItems from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/pnp/sp-dev-fx-controls-react/issues/135)
- `PeoplePicker`: Initialize with users from a list item [#138](https://github.com/pnp/sp-dev-fx-controls-react/issues/138)
- `PeoplePicker`: Remove Messagebar error handling to match Office UI Fabric field error styling [#140](https://github.com/pnp/sp-dev-fx-controls-react/issues/140)
- `PeoplePicker`: REST API filter and nometadata header added to reduce payload [#139](https://github.com/pnp/sp-dev-fx-controls-react/issues/139)
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ Special thanks to our contributors (in alphabetical order): [Hugo Bernier](https
- Dutch localization added [#100](https://github.com/pnp/sp-dev-fx-controls-react/issues/100)
- German localization added [#101](https://github.com/pnp/sp-dev-fx-controls-react/issues/101)
- French localization added [#102](https://github.com/pnp/sp-dev-fx-controls-react/issues/102)
- `PeoplePicker`: Move defaultSelectedUsers from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/pnp/sp-dev-fx-controls-react/issues/135)
- `PeoplePicker`: Move defaultSelectedItems from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/pnp/sp-dev-fx-controls-react/issues/135)
- `PeoplePicker`: Initialize with users from a list item [#138](https://github.com/pnp/sp-dev-fx-controls-react/issues/138)
- `PeoplePicker`: Remove Messagebar error handling to match Office UI Fabric field error styling [#140](https://github.com/pnp/sp-dev-fx-controls-react/issues/140)
- `PeoplePicker`: REST API filter and nometadata header added to reduce payload [#139](https://github.com/pnp/sp-dev-fx-controls-react/issues/139)
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/docs/controls/PeoplePicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The People picker control can be configured with the following properties:
| onChange | (items: IPersonaProps[]) => void | no | Get the selected users in the control. | |
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element | |
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only | |
| defaultSelectedUsers | string[] | no | Default selected user emails or login names, optionally append `/title` with forward slash. If user is not found then only optional title will be shown. If you do not have email or login name of inactive users just pass `/title` alone prefixed with slash.| |
| defaultSelectedItems | string[] | no | Default selected user emails or login names, optionally append `/title` with forward slash. If user is not found then only optional title will be shown. If you do not have email or login name of inactive users just pass `/title` alone prefixed with slash.| |
| webAbsoluteUrl | string | no | Specify the site URL on which you want to perform the user query call. If not provided, the people picker will perform a tenant wide people/group search. When provided it will search users/groups on the provided site. | |
| principalTypes | PrincipalType[] | no | Define which type of data you want to retrieve: User, SharePoint groups, Security groups. Multiple are possible. | |
| ensureUser | boolean | no | When ensure user property is true, it will return the local user ID on the current site when doing a tenant wide search. | false |
Expand Down
4 changes: 2 additions & 2 deletions src/controls/dynamicForm/dynamicField/DynamicField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export class DynamicField extends React.Component<IDynamicFieldProps, IDynamicFi
</div>
<PeoplePicker
placeholder={placeholder}
defaultSelectedUsers={defaultValue}
defaultSelectedItems={defaultValue}
peoplePickerCntrlclassName={styles.feildDisplay}
context={context}
personSelectionLimit={1}
Expand All @@ -351,7 +351,7 @@ export class DynamicField extends React.Component<IDynamicFieldProps, IDynamicFi
</div>
<PeoplePicker
placeholder={placeholder}
defaultSelectedUsers={defaultValue}
defaultSelectedItems={defaultValue}
peoplePickerCntrlclassName={styles.feildDisplay}
context={context}
personSelectionLimit={30}
Expand Down
18 changes: 9 additions & 9 deletions src/webparts/controlsTest/components/ControlsTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1146,20 +1146,20 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
groupName="Team Site Visitors 123"
ensureUser={true}
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
defaultSelectedUsers={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
defaultSelectedItems={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
onChange={this._getPeoplePickerItems} />

<PeoplePicker context={this.props.context}
titleText="People Picker (search for group)"
groupName="Team Site Visitors"
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
defaultSelectedUsers={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
defaultSelectedItems={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
onChange={this._getPeoplePickerItems} />

<PeoplePicker context={this.props.context}
titleText="People Picker (pre-set global users)"
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
defaultSelectedUsers={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
defaultSelectedItems={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
onChange={this._getPeoplePickerItems}
personSelectionLimit={2}
ensureUser={true} />
Expand All @@ -1168,7 +1168,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
titleText="People Picker (pre-set local users)"
webAbsoluteUrl={this.props.context.pageContext.site.absoluteUrl}
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
defaultSelectedUsers={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
defaultSelectedItems={["admin@tenant.onmicrosoft.com", "test@tenant.onmicrosoft.com"]}
onChange={this._getPeoplePickerItems} />

<PeoplePicker context={this.props.context}
Expand All @@ -1177,8 +1177,8 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
// groupName={"Team Site Owners"}
showtooltip={true}
required={true}
//defaultSelectedUsers={["tenantUser@domain.onmicrosoft.com", "test@user.com"]}
//defaultSelectedUsers={this.state.authorEmails}
//defaultSelectedItems={["tenantUser@domain.onmicrosoft.com", "test@user.com"]}
//defaultSelectedItems={this.state.authorEmails}
onChange={this._getPeoplePickerItems}
showHiddenInUI={false}
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
Expand All @@ -1200,8 +1200,8 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
// groupName={"Team Site Owners"}
showtooltip={true}
required={true}
//defaultSelectedUsers={["tenantUser@domain.onmicrosoft.com", "test@user.com"]}
//defaultSelectedUsers={this.state.authorEmails}
//defaultSelectedItems={["tenantUser@domain.onmicrosoft.com", "test@user.com"]}
//defaultSelectedItems={this.state.authorEmails}
onChange={this._getPeoplePickerItems}
showHiddenInUI={false}
principalTypes={[PrincipalType.User, PrincipalType.SharePointGroup, PrincipalType.SecurityGroup, PrincipalType.DistributionList]}
Expand All @@ -1212,7 +1212,7 @@ export default class ControlsTest extends React.Component<IControlsTestProps, IC
titleText="People Picker (disabled)"
disabled={true}
showtooltip={true}
defaultSelectedUsers={['aleksei.dovzhyk@sharepointalist.com']} />
defaultSelectedItems={['aleksei.dovzhyk@sharepointalist.com']} />

<DateTimePicker label="DateTime Picker (unspecified = date and time)" />

Expand Down

0 comments on commit a977ca5

Please sign in to comment.