locked
SPFX get value from PnP People Picker RRS feed

  • Question

  • I want to get email value from PnP People Picker when user fill value.

    Is there any event to trace this and return value ?

    Thanks for any solution.

    Friday, July 3, 2020 2:39 AM

All replies

  • Hi,

    Sample script for your reference.

    private _getPeoplePickerItems(Users: any[]) {
        Users.forEach(user => {
          console.log(user.secondaryText);
        });
      }
    
    
    
    <PeoplePicker
                  context={this.props.context}
                  titleText="People Picker"
                  personSelectionLimit={3}
                  groupName={''}
                  showtooltip={false}
                  isRequired={false}
                  disabled={false}
                  selectedItems={this._getPeoplePickerItems}
                  defaultSelectedUsers={this.state.PeoplePickerDefaultItems}
                  showHiddenInUI={false}
                  principalTypes={[PrincipalType.User]}
                  resolveDelay={1000}
                  ref={c => (this.ppl = c)} 
                />
    
    

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    • Proposed as answer by sadomovalexMVP Wednesday, July 8, 2020 3:11 PM
    Monday, July 6, 2020 2:52 AM