Question

I want to change a state when the user remove a person from people picker?

  <NormalPeoplePicker
                onChange={this._onChange.bind(this)}
                onResolveSuggestions={this._onFilterChanged}
                getTextFromItem={(persona: IPersonaProps) => persona.primaryText}
                pickerSuggestionsProps={suggestionProps}
                className={'ms-PeoplePicker'}
                key={'normal'}
                itemLimit={1}
                // defaultSelectedItems={this.state.selectedItems}
                onRemoveSuggestion={}

              />

Thanks

Était-ce utile?

La solution

We have to use the onChange method on the component private _onChange = (items: IPersonaProps[]) => { this.setState({ selectedItems: items }); } See my detailed post regarding this implementation http://www.thesharepointguide.com/sharepoint-framework-office-ui-fabric/

Hope this helps

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top